ero*_*las 6 xaml windows-phone-8 windows-phone-8.1
在Windows Phone 8.1应用程序中,这相当于什么.当我创建一个新的应用程序时,没有更多的手机:ApplicationPage
<phone:PhoneApplicationPage
...
...
SupportedOrientations="Landscape" Orientation="LandscapeLeft"
shell:SystemTray.IsVisible="False">
Run Code Online (Sandbox Code Playgroud)
您可以通过代码强制任何页面的方向,在this.InitializeComponent()之后写入:
DisplayInformation.AutoRotationPreferences = DisplayOrientations.Landscape;
Run Code Online (Sandbox Code Playgroud)
要么
DisplayInformation.AutoRotationPreferences = DisplayOrientations.LandscapeFlipped;
Run Code Online (Sandbox Code Playgroud)
要么
DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait;
Run Code Online (Sandbox Code Playgroud)
是的,在Windows Phone 8.1中,我们无法在页面的XAML中设置supportedOrientations.我们只能在Package.appxmanifest中设置App的supportedOrientations.
| 归档时间: |
|
| 查看次数: |
1969 次 |
| 最近记录: |