Orientation Hint for Windows Phone7

In this article I will be a showing you a nice hint for Orientation.

Normally when you first develop and run your application without changing its Orientation, it will use Portrait by default.



This isn't what we want, is it?

Now get to Orientation Property of the WindowsPhoneApplication:


Choose LanscapeRight for example. And you will see in Design Mode that Orientation of the WP7 has changed.


Now look at above this, you will see a Yellow-warning box saying:

"This page does not support the current orientation. Click here to enable the page to support all orientations."


Using this method now you have support for all the orientations no matter what.

The other alternative way doing this is to change this line:

SupportedOrientations="Portrait" Orientation="LandscapeRight"

Into this one:

SupportedOrientations="PortraitOrLandscape" Orientation="LandscapeRight"

Hope it helps!