Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

orientation property

Returns a numeric value representing the orientation of the device.

This property is read-only.

Syntax


nRotation = window.orientation;

Property values

Type: String

ValueCondition
0

The device is in portrait mode.

90

The device is in landscape mode, turned 90 degrees to the left.

-90

The device is in landscape mode, turned 90 degrees to the right.

0

The device is in portrait mode; however, it is inverted from its normal position.

 

See also

window

 

 

Show:
© 2017 Microsoft