Is it possible to programatically set the display to a specific orientation?
I’m converting middleware code that on some platforms like Android use functions (like Activity::setRequestedOrientation()) that lets the developer change the display’s orientation at any time in the application. Is it possible to do the same in Metro? Or do I only have access to the display through orientation change events?
My application is a fullscreen Direct X app.
Thanks!
You need to set the autorotation preferences, I believe:
http://msdn.microsoft.com/en-us/library/windows/apps/windows.graphics.display.displayproperties.autorotationpreferences.aspx
These will allow you to set your current orientation; However, if you’ve got more than one set, then it will clearly pick that which it believes the device is currently set in.
Be aware that your app could be running on a device which doesn’t support rotation — e.g. desktop.