Compartilhar via


DisplayProperties.OrientationChanged Evento

Definição

Observação

DisplayProperties pode ser alterado ou indisponível para versões após Windows 8.1. Em vez disso, use DisplayInformation.

Ocorre quando a propriedade CurrentOrientation ou NativeOrientation é alterada devido a uma alteração de modo ou uma alteração de 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 

Tipo de evento

Atributos

Aplica-se a