Today we start with some basic but important feature for Windows Phone which is Orientation of screen. As we know windows mobile phone is handy device a user can handle it any ways like portrait or landscape. Our main aim here is to change our screen orientation according to user action. Windows phone page has two properties for this activity.
When you open the XAML of the page in the phone application page you will find SupportedOrientations and Orientation by default these properties having value Portrait.
Support Orientations can have following property
a) Landscape (It support Landscape view only)
b) Portrait ( It support Portrait View only)
c) PortraitOrLandScape (It support both View )
While Orientation can have following values
To change the page layout we need to set supportOrientation property to “portraitOrLandscape” And design the page in such a way that it automatically resize according to screen and take their position else you have to do programming for it to put control at proper place.
In current example I have use stack panel and in this stack panel I have used image control. To enable page orientation I have just change the support orientation property. To know we are seeing which orientation I have added an event which is page orientation event.
You can say it will be simplest example for more information please download the project. (indiandotnet_Wp7_PageOrientation.zip)
Thanks & Best Regards,