DisplayInformation.DisplayContentsInvalidated 事件

定义

当显示器需要重绘时发生。

// Register
static event_token DisplayContentsInvalidated(TypedEventHandler<DisplayInformation, IInspectable const&> const& handler) const;

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

// Revoke with event_revoker
static DisplayInformation::DisplayContentsInvalidated_revoker DisplayContentsInvalidated(auto_revoke_t, TypedEventHandler<DisplayInformation, IInspectable const&> const& handler) const;
public static event TypedEventHandler<DisplayInformation,object> DisplayContentsInvalidated;
function onDisplayContentsInvalidated(eventArgs) { /* Your code */ }
Windows.Graphics.Display.DisplayInformation.addEventListener("displaycontentsinvalidated", onDisplayContentsInvalidated);
Windows.Graphics.Display.DisplayInformation.removeEventListener("displaycontentsinvalidated", onDisplayContentsInvalidated);
- or -
Windows.Graphics.Display.DisplayInformation.ondisplaycontentsinvalidated = onDisplayContentsInvalidated;
Public Shared Custom Event DisplayContentsInvalidated As TypedEventHandler(Of DisplayInformation, Object) 

事件类型

注解

此事件是静态的。

由于此事件是静态的,因此建议直接从 DisplayInformation 对象访问它,而不是从调用 DisplayInformation.GetForCurrentView 方法时获取的当前物理显示信息进行访问。

适用于