Tag Archive | Orientation

Windows Phone 8 and 7 – Locking the aspect ratio to portrait or landscape

I love apps that support orientation changes, it helps the user see content when they’re tucked up in bed, or just busting a gut on the way to work on the train. Sometimes however they are not suitable, or there might be bugs with one mode and not the other, and disabling a troublesome orientation might be the wisest move rather than drop quality. Here’s how you can do it in Windows Phone apps.

In MainPage.xaml, in the phone:PhoneApplicationPage section, add or change the following properties to set the available orientations to one of:




You can then set the initial orientation to one of: