DisplayInformation.OrientationChanged Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
TypedEventHandler<DisplayInformation,IInspectable>
Remarks
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.