问题
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:
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.
来源:https://stackoverflow.com/questions/24065554/universal-app-windows-phone-orientation