O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting Page Orientation at Runtime

As you saw in the previous section, the Orientation property of the PhoneApplicationPage class cannot be assigned at runtime. Another approach is required to change the page orientation. For this turn to the SupportedOrientations property, which is assignable at runtime.

To recap, the SupportedOrientations property defines the allowed orientation or orientations of the page, which can be Portrait, Landscape, or PortraitOrLandscape.

Setting the SupportedOrientations property to the desired orientation forces the page to be shown in that orientation. For example, if the page is being viewed in portrait orientation, and you want to change the page orientation to landscape, you can set the SupportedOrientations ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required