The PhoneApplicationPage has the property Supported Orientation which is used to restrict the orientation of the page in a Windows Phone App.
It accepts the values
How to Prevent the Orientation from being changed in Windows Phone App?
Setting the Supported Orientation to Portrait, Landscape will restrict the orientation from being changed when the windows phone device is rotated.
If the Supported Orientation is set to PortraitOrLandScape, this will allow the orientation to be changes automatically when the device is rotated.