Set supported orientations in XAML on Windows Phone 8.1

Being able to set supported orientations in XAML on every page by simply setting the SupportedOrientations property on PhoneApplicationPage is something Windows Phone developers are used to on Silverlight platform. However, with Windows Phone 8.1 and WinRT platform, it's possible to do so (only?) in code behind. On Windows Phone 8.1 you can set the supported orientations in Package.appxmanifest. Setting it that way means you're setting it on application level - all pages follow the same rule.  However, there is a way to set the current supported orientation using DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait; at any moment, which…

Read More

MVP Reconnect - say hi on Twitter

Microsoft MCSD

profile for igrali at Stack Overflow, Q&A for professional and enthusiast programmers

Latest Posts