Portrait and Landscape

While you rarely rotate your desktop or even laptop monitor, a phone naturally supports both Portrait and Landscape modes. The current orientation can be read using the PhoneApplicationPage.Orientation property. It returns one of the PageOrientation enumeration values: None, Portrait, Landscape, PortraitUp, PortraitDown, LandscapeLeft, LandscapeRight.

If you want to programmatically set the orientation of the page, you can set the SupportedOrientations property of the PhoneApplicationPage class to Portrait, Landscape or PortraitOrLandscape. In the latter case, the UI will automatically rotate based on the input from the accelerometer. Combined with the advanced layout features of Silverlight, you can create an UI that adheres to the layout changes without having to write a single line of code. See Figure 14 for an example from the app "Guitar Tuner".

Read More....