locked
App orientation locked to portrait wp 8.1 RRS feed

  • Question

  • Hello

    My app is portrait locked, I am not sure if there is something I should make to allow landscape and landscape flipped. I have checked a sample from Microsoft and found no special handling the sample runs perfectly with no problems with the orientation. However my app's orientation is not working at all. Kindly advise.

    Thank you in advance

    Moe

    Monday, March 16, 2015 8:35 AM

Answers

  • The problem is that the initial page had this code automatically inserted

    DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait;

    When I removed it, everything is working fine.

    • Marked as answer by Don Hamdan Monday, March 16, 2015 10:25 AM
    Monday, March 16, 2015 10:22 AM

All replies

  • If its a WP silverlight app then changing the 'SupportedOrientation' property in the xaml can do

        SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
    
    else in WP 8.1 Runtime, that needs to be changed from code behind(orientations property isn't available in xaml)


    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

    Monday, March 16, 2015 8:50 AM
  • The problem is that the initial page had this code automatically inserted

    DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait;

    When I removed it, everything is working fine.

    • Marked as answer by Don Hamdan Monday, March 16, 2015 10:25 AM
    Monday, March 16, 2015 10:22 AM