DisplayProperties.OrientationChanged | orientationchanged event

0 out of 1 rated this helpful - Rate this topic

Occurs when either the CurrentOrientation or NativeOrientation property changes because of a mode change or a monitor change.

Syntax


function onOrientationChanged(eventArgs) { /* Your code */ }
 
// addEventListener syntax
displayProperties.addEventListener("orientationchanged", onOrientationChanged);
displayProperties.removeEventListener("orientationchanged", onOrientationChanged);
 
- or -

displayProperties.onorientationchanged = onOrientationChanged;


Event information

Delegate DisplayPropertiesEventHandler

Remarks

The DisplayProperties.OrientationChanged event occurs only when orientation of the display or monitor changes and not necessarily when the orientation of your app changes. To determine the orientation of your app for layout purposes, use the ApplicationView.Value property.

Examples



    _displayHandlerToken = DisplayProperties::OrientationChanged +=
    ref new DisplayPropertiesEventHandler(this, &MainPage::Page_OrientationChanged);

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

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.