Share via


DisplayInformation.OrientationChanged 事件

定義

發生于因為模式變更或監視變更而變更 CurrentOrientationNativeOrientation 屬性時。

// 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) 

事件類型

備註

OrientationChanged 事件只會在顯示或監視器的方向變更時發生,而且不一定是應用程式的方向變更時。 若要判斷應用程式的版面配置方向,請使用 ApplicationView.Value 屬性。

適用於