DisplayInformation.OrientationChanged Event


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

// Register
event_token OrientationChanged(TypedEventHandler<DisplayInformation, IInspectable const&> const& handler) const;

// Revoke with event_token
void OrientationChanged(event_token const* cookie) const;

// Revoke with event_revoker
DisplayInformation::OrientationChanged_revoker OrientationChanged(auto_revoke_t, TypedEventHandler<DisplayInformation, IInspectable const&> const& handler) const;
public event TypedEventHandler<DisplayInformation,object> OrientationChanged;
function onOrientationChanged(eventArgs) { /* Your code */ }
displayInformation.addEventListener("orientationchanged", onOrientationChanged);
displayInformation.removeEventListener("orientationchanged", onOrientationChanged);
- or -
displayInformation.onorientationchanged = onOrientationChanged;
Public Custom Event OrientationChanged As TypedEventHandler(Of DisplayInformation, Object) 

Event Type


The 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.

Applies to