Bagikan melalui


DisplayProperties.OrientationChanged Kejadian

Definisi

Catatan

DisplayProperties dapat diubah atau tidak tersedia untuk rilis setelah Windows 8.1. Sebagai gantinya, gunakan DisplayInformation.

Terjadi ketika properti CurrentOrientation atau NativeOrientation berubah karena perubahan mode atau perubahan monitor.

public:
 static event DisplayPropertiesEventHandler ^ OrientationChanged;
/// [add: Windows.Foundation.Metadata.Deprecated("DisplayProperties may be altered or unavailable for releases after Windows Phone 8.1. Instead, use DisplayInformation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
/// [remove: Windows.Foundation.Metadata.Deprecated("DisplayProperties may be altered or unavailable for releases after Windows Phone 8.1. Instead, use DisplayInformation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
// Register
static event_token OrientationChanged(DisplayPropertiesEventHandler const& handler) const;

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

// Revoke with event_revoker
static DisplayProperties::OrientationChanged_revoker OrientationChanged(auto_revoke_t, DisplayPropertiesEventHandler const& handler) const;
/// [add: Windows.Foundation.Metadata.Deprecated("DisplayProperties may be altered or unavailable for releases after Windows Phone 8.1. Instead, use DisplayInformation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
/// [remove: Windows.Foundation.Metadata.Deprecated("DisplayProperties may be altered or unavailable for releases after Windows Phone 8.1. Instead, use DisplayInformation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
// Register
static event_token OrientationChanged(DisplayPropertiesEventHandler const& handler) const;

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

// Revoke with event_revoker
static DisplayProperties::OrientationChanged_revoker OrientationChanged(auto_revoke_t, DisplayPropertiesEventHandler const& handler) const;
[add: Windows.Foundation.Metadata.Deprecated("DisplayProperties may be altered or unavailable for releases after Windows Phone 8.1. Instead, use DisplayInformation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
[remove: Windows.Foundation.Metadata.Deprecated("DisplayProperties may be altered or unavailable for releases after Windows Phone 8.1. Instead, use DisplayInformation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
public static event DisplayPropertiesEventHandler OrientationChanged;
[add: Windows.Foundation.Metadata.Deprecated("DisplayProperties may be altered or unavailable for releases after Windows Phone 8.1. Instead, use DisplayInformation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
[remove: Windows.Foundation.Metadata.Deprecated("DisplayProperties may be altered or unavailable for releases after Windows Phone 8.1. Instead, use DisplayInformation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
public static event DisplayPropertiesEventHandler OrientationChanged;
function onOrientationChanged(eventArgs) { /* Your code */ }
Windows.Graphics.Display.DisplayProperties.addEventListener("orientationchanged", onOrientationChanged);
Windows.Graphics.Display.DisplayProperties.removeEventListener("orientationchanged", onOrientationChanged);
- or -
Windows.Graphics.Display.DisplayProperties.onorientationchanged = onOrientationChanged;
Public Shared Custom Event OrientationChanged As DisplayPropertiesEventHandler 

Jenis Acara

Atribut

Berlaku untuk