Change Camera Resolution w.r.t to layouts

I need to update the camera resolution depending on layout. if 3x3 layout is used, need to set width & height to some value and a camera is clicked and viewed on full screen set the width =0 and height =0. how can i get the event of full screen single camera and event when it is back to normal?

Unfortunately there is no event when a view item is maximized or restored.

There are many other events, for changing the selected view to name one, but unfortunately not for the maximize event. To see other event messages explore the Message Tester plugin sample.

Thanks