I am working on a Silverlight 4 application from a browser (OOB) on a tablet PC running Windows 7. In most cases, the program is in full screen mode. However, if the user rotates the tablet, the application rotates and remains full-screen, but scales to the previous screen orientation. Removing an application from full screen mode and returning it in full screen mode scales everything correctly. Is there any way to detect when the screen rotates? So far, I've tried Resize, LayoutChanged, and FullScreenChanged events, and had a MainChanged event handler for the main page. None of them work when the application rotates in full screen mode.
Per Josh Einstein, I tried polling the ActualWidth / Height timer application. After rotation, the ActualWidth / Height values returned from the Silverlight plug-in appear to be pre-rotated values. Only removing it from full screen mode and returning it in full screen mode will change the resolution of the plug-in. HtmlPage.Eval hack did not work since I am OOB.
There is an OnOrientationChanged event in Silverlight WP7 that doesn't seem to be available in the desktop version. Does anyone have any ideas?
source
share