2 out of 2 rated this helpful - Rate this topic

DisplayOrientations enumeration

Applies to Windows and Windows Phone

Describes the orientation of a rectangular monitor.

Syntax


var value = Windows.Graphics.Display.DisplayOrientations.none;

Attributes

[Flags()]
[Version(0x06020000)]

Members

The DisplayOrientations enumeration has these members.

MemberValueDescription
None | none0

No display orientation is specified.

Landscape | landscape1

Specifies that the monitor is oriented in landscape mode where the width of the display viewing area is greater than the height.

Portrait | portrait2

Specifies that the monitor rotated 90 degrees in the clockwise direction to orient the display in portrait mode where the height of the display viewing area is greater than the width.

LandscapeFlipped | landscapeFlipped4

Specifies that the monitor rotated another 90 degrees in the clockwise direction (to equal 180 degrees) to orient the display in landscape mode where the width of the display viewing area is greater than the height. This landscape mode is flipped 180 degrees from the Landscape mode.

PortraitFlipped | portraitFlipped8

Specifies that the monitor rotated another 90 degrees in the clockwise direction (to equal 270 degrees) to orient the display in portrait mode where the height of the display viewing area is greater than the width. This portrait mode is flipped 180 degrees from the Portrait mode.

Remarks

Display orientation expresses the angle at which a monitor rotated in the clockwise direction to show a straight picture. For example, if the operating system reports orientation as 90 degrees, the user rotated the monitor 90 degrees clockwise to show a straight picture; if the user returns the monitor to its original position, the operating system reports orientation as 90 degrees counterclockwise. Applications typically use this property to translate the reading of an accelerometer or to translate the physical button events in accordance with the current screen rotation.

A device that is first oriented in landscape mode has the following angles of rotation:

  • Landscape = 0 degrees
  • Portrait = 90 degrees
  • LandscapeFlipped = 180 degrees
  • PortraitFlipped = 270 degrees

A device that is first oriented in portrait mode has the following angles of rotation:

  • Portrait = 0 degrees
  • LandscapeFlipped = 90 degrees
  • PortraitFlipped = 180 degrees
  • Landscape = 270 degrees

The Scaling according to DPI sample shows how to use the DisplayOrientations enumeration.

The DisplayOrientations values describe the orientation of the display or monitor and not necessarily the orientation of your app. To determine the orientation of your app for layout purposes, use the ApplicationView.Value property.

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

CurrentOrientation
NativeOrientation
OrientationChanged

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.