What is the equivalent of this in Windows Phone 8.1 App. When I create a new app, there is no more phone:ApplicationPage
<phone:PhoneApplicationPage
...
...
SupportedOrientations="Landscape" Orientation="LandscapeLeft"
shell:SystemTray.IsVisible="False">
You can force the orientation of any page via code, writing just after the this.InitializeComponent():
DisplayInformation.AutoRotationPreferences = DisplayOrientations.Landscape;
or
DisplayInformation.AutoRotationPreferences = DisplayOrientations.LandscapeFlipped;
or
DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait;
Yes, In windows phone 8.1, We can't set supportedOrientations in page's XAML. We can set supportedOrientations of App in Package.appxmanifest only.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With