DisplayProperties.LogicalDpiChanged 事件

定义

注意

在Windows 8.1后,DisplayProperties 可能会更改或不可用。 请改用 DisplayInformation

LogicalDpi 属性更改时发生,因为每英寸像素 (PPI) 显示更改。

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 

事件类型

属性

适用于