2
\$\begingroup\$

I am developing a game in which I need to rotate the screen on Landscape mode or Portrait, and lock it that way.

In Monogame, targeting Windows Phone 8.1 adding this code:

Graphics.SupportedOrientations = DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight;
            Graphics.ApplyChanges();

Was enough, but in Monogame, targeting Windows Phone 8 I can switch from Portrait mode to Landscape, even if I put the code above in the game constructor.

How can I stop/freeze the user from chaning the orientations on a specific category in my game?

Thanks.

\$\endgroup\$
1
  • \$\begingroup\$ Does windows phone have an activity ? In android I use ScreenOrientation = ScreenOrientation.SensorLandscape; and it does what you describe. The user can rotate left/right keeping landscape mode at all times. I have no experience with windows phone unfortunately. \$\endgroup\$
    – dimitris93
    Commented May 16, 2015 at 19:02

1 Answer 1

-1
\$\begingroup\$

Go to your package manifest. There should be the options for screen orientation. Uncheck the portrait.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .