user3697869
user3697869

Reputation: 17

how to disable screen rotation in my Windows Phone 8 Application?

I try to disable screen rotation in my application because images are moving and it's not good. How can I disable to landscape ?

Upvotes: 0

Views: 764

Answers (1)

Kasun Kodagoda
Kasun Kodagoda

Reputation: 4024

Basically what i understand from this question is that you need your WP8 app to be locked in one orientation. Disable landscape means you need the app to be in portrait mode, Assuming that the easiest way to do this is in your page, in XAML view set the following values in phone:PhoneApplicationPage tag

SupportedOrientations="Portrait" Orientation="Portrait"

SupportedOrientations property has 3 values, Portrait, Landscape, PortraitOrLandscape. and Orientation property has None, Landscape, LandscapeLeft, LandscapeRight, Portrait, PortraitUp and PortraitDown. Choose as you need. In your case the above values should do it

Upvotes: 2

Related Questions