Universal App Windows Phone Orientation

不羁的心 提交于 2019-12-31 04:20:28

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!