Sdílet prostřednictvím


DisplayProperties.LogicalDpiChanged Event

Definition

Note

DisplayProperties may be altered or unavailable for releases after Windows 8.1. Instead, use DisplayInformation.

Occurs when the LogicalDpi property changes because the pixels per inch (PPI) of the display changes.

public:
 static event DisplayPropertiesEventHandler ^ LogicalDpiChanged;
/// [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 LogicalDpiChanged(DisplayPropertiesEventHandler const& handler) const;

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

// Revoke with event_revoker
static DisplayProperties::LogicalDpiChanged_revoker LogicalDpiChanged(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 LogicalDpiChanged(DisplayPropertiesEventHandler const& handler) const;

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

// Revoke with event_revoker
static DisplayProperties::LogicalDpiChanged_revoker LogicalDpiChanged(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 LogicalDpiChanged;
[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 LogicalDpiChanged;
function onLogicalDpiChanged(eventArgs) { /* Your code */ }
Windows.Graphics.Display.DisplayProperties.addEventListener("logicaldpichanged", onLogicalDpiChanged);
Windows.Graphics.Display.DisplayProperties.removeEventListener("logicaldpichanged", onLogicalDpiChanged);
- or -
Windows.Graphics.Display.DisplayProperties.onlogicaldpichanged = onLogicalDpiChanged;
Public Shared Custom Event LogicalDpiChanged As DisplayPropertiesEventHandler 

Event Type

Attributes

Applies to