Condividi tramite


DisplayProperties.OrientationChanged Evento

Definizione

Nota

DisplayProperties può essere modificato o non disponibile per le versioni dopo Windows 8.1. Usare invece DisplayInformation.

Si verifica quando la proprietà CurrentOrientation o NativeOrientation cambia a causa di una modifica della modalità o di una modifica del monitoraggio.

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 

Tipo evento

Attributi

Si applica a