Answered by:
How do I disable portrait mode?

Question
-
How do I disable portrait mode? I only want to support landscape mode.
www.emadibrahim.com
Sunday, July 22, 2012 12:25 AM
Answers
-
Check out the Windows.Graphics.Display.DisplayProperties.autoRotationPreferences and currentOrientation properties that provide programmatic control over orientation behaviors. For demonstrations, refer to the Device auto rotation preferences sample in the Windows SDK.
- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Tuesday, July 24, 2012 2:10 PM
- Marked as answer by MingXu-MSFTMicrosoft employee, Moderator Monday, July 30, 2012 10:11 AM
Monday, July 23, 2012 4:46 PM
All replies
-
You can set application orientation preferences in the app manifest. To do this in VS2012, go to Store -> Edit App Manifest and click on the Application UI tab.
- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Monday, July 23, 2012 3:03 PM
- Unproposed as answer by Emad Monday, July 23, 2012 3:35 PM
Monday, July 23, 2012 10:45 AM -
That doesn't do anything. The app still rotated.
www.emadibrahim.com
Monday, July 23, 2012 3:35 PM -
Check out the Windows.Graphics.Display.DisplayProperties.autoRotationPreferences and currentOrientation properties that provide programmatic control over orientation behaviors. For demonstrations, refer to the Device auto rotation preferences sample in the Windows SDK.
- Proposed as answer by Jeff SandersMicrosoft employee, Moderator Tuesday, July 24, 2012 2:10 PM
- Marked as answer by MingXu-MSFTMicrosoft employee, Moderator Monday, July 30, 2012 10:11 AM
Monday, July 23, 2012 4:46 PM -
Hi All,
Our application supports only portrait mode and it is working fine.
But when I attach external keyboard for Microsoft surface tablet, my application is converted to landscape mode.
Can I prevent this behavior to not to rotate to landscape even if external keyboard is attached?
I know it will not be good user experience, but my application is designed for portrait only, so when it rotated to landscape the UI looks very bad.
Thanks.
Monday, February 11, 2013 10:52 AM