MG 3.5 + VS 2015 upd. 3 + Win10 Lumia 650
I'm converting a game from XNA and within a week I got all the graphics and input migrated to MG. So far everything appears to be working as expected on both phone and PC, yay. With all the various device screen resolutions around I thought I should add pillarboxing and for this I need the currently used screen resolution of the device.
In my Game class initialization code I am setting IsFullScreen=true. To find the screen resolution I've added a Window.ClientSizeChanged event handler. Debug output from the this handler shows it is called twice when the game starts on phone (some milliseconds apart) with differently reported resolutions. Here is how my debug output looks:
Window_ClientSizeChanged() GraphicsDevice.Viewport w=1096 h=720, graphics.isFullScreen=True
[some milliseconds later...]
Window_ClientSizeChanged() GraphicsDevice.Viewport w=1280 h=720, graphics.isFullScreen=True
The first line supposedly shows the width with the navigation and status panels still visible (in landscape). The second line is the actual true full screen resolution. Strangely, if I remove the IsFullScreen=true in my initialization code the above output and behavior remains on phone.
When run on PC everything behaves as expected, f.ex:
Window_ClientSizeChanged() GraphicsDevice.Viewport w=1920 h=1080, graphics.isFullScreen=True
[exit full screen mode manually]
Window_ClientSizeChanged() GraphicsDevice.Viewport w=800 h=480, graphics.isFullScreen=False
The results I am seeing on Windows Phone do not appear to be consistent with MS definition of UWP full screen on phones. What am I missing here? Also curious as to the reason why the event handler is invoked twice on phone?