1
votes

Recently I was developing a Universal app for both the Windows Phone and Windows Store. In that app, I was trying to fix the Orientation of the App to Landscape. But in WinRT based apps of Windows Phone 8.1, I failed to find any Orientation option.

In the Silverlight apps, we can fix the Orientations as we want. But is there any way to fix the Orientation to Landscape mode in the Universal Apps?

It will be very helpful if someone help me in this regard. Thanks in advance. :)

1
Have you looked in package.appxmanifest file - supported rotations?Romasz
Thanks man. This was the thing that I needed. I was trying to set the orientation from the MainPage.xaml and MainPage.xaml.cs. I have never thought in the way. Thanks again. :D @RomaszTanvir Sourov
You might find this interesting blog.jerrynixon.com/2013/12/…Jerry Nixon
Thanks a lot. :) @JerryNixon-MSFTTanvir Sourov

1 Answers

4
votes

Under WinRT you can have a look at DisplayInformation class, where you will find probably all you need.

You can also declare your supported rotations in Package.appxmanifest file in Supported rotations.

Here you can download an example of an App with three Pages, each with different orientation.