1 out of 4 rated this helpful - Rate this topic

DisplayProperties.AutoRotationPreferences | autoRotationPreferences property

Gets and sets the preferred orientation of the app.

Syntax


var autoRotationPreferences = Windows.Graphics.Display.DisplayProperties.autoRotationPreferences;
Windows.Graphics.Display.DisplayProperties.autoRotationPreferences = autoRotationPreferences;

Property value

Type: DisplayOrientations

The orientation of a rectangular monitor.

Remarks

The Device auto rotation preferences sample shows how to use the AutoRotationPreferences property to handle device rotation events.

To make layout decisions for your app, use ApplicationView.

The simulator and an app's auto-rotation preferences property are mutually exclusive. The simulator relies on a local loop back remote session, which is incompatible with the mode changes that the rotation manager initiates. Therefore, the rotation that the simulator performs is independent of the rotation manager. When you use the simulator to change the rotation of your app, be aware that the simulator doesn't honor your app's auto-rotation preferences because the rotation manager is not functional in this situation. For more info about the simulator, see Running Windows Store apps in the simulator.

Examples


    Windows::Graphics::Display::DisplayProperties::AutoRotationPreferences = 
        Windows::Graphics::Display::DisplayOrientations::Landscape |
        Windows::Graphics::Display::DisplayOrientations::LandscapeFlipped;


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.Graphics.Display
Windows::Graphics::Display [C++]

Metadata

Windows.winmd

See also

DisplayProperties

 

 

Build date: 2/25/2013

© 2013 Microsoft. All rights reserved.