共用方式為


DisplayManager.PathsFailedOrInvalidated 事件

定義

每當系統以非同步方式失敗或無效顯示路徑時引發的事件。 這可能是因為變更硬體頻寬需求,或因為驅動程式失敗所致。

此事件的訂閱者應該針對自己擁有的目標呼叫 TryAcquireTargetsAndReadCurrentState ,並檢查產生的 DisplayState 物件中的任何路徑是否將其 Status 屬性設定為 FailedAsyncInvalidatedAsync,並採取建議的動作。

// Register
event_token PathsFailedOrInvalidated(TypedEventHandler<DisplayManager, DisplayManagerPathsFailedOrInvalidatedEventArgs const&> const& handler) const;

// Revoke with event_token
void PathsFailedOrInvalidated(event_token const* cookie) const;

// Revoke with event_revoker
DisplayManager::PathsFailedOrInvalidated_revoker PathsFailedOrInvalidated(auto_revoke_t, TypedEventHandler<DisplayManager, DisplayManagerPathsFailedOrInvalidatedEventArgs const&> const& handler) const;
public event TypedEventHandler<DisplayManager,DisplayManagerPathsFailedOrInvalidatedEventArgs> PathsFailedOrInvalidated;
function onPathsFailedOrInvalidated(eventArgs) { /* Your code */ }
displayManager.addEventListener("pathsfailedorinvalidated", onPathsFailedOrInvalidated);
displayManager.removeEventListener("pathsfailedorinvalidated", onPathsFailedOrInvalidated);
- or -
displayManager.onpathsfailedorinvalidated = onPathsFailedOrInvalidated;
Public Custom Event PathsFailedOrInvalidated As TypedEventHandler(Of DisplayManager, DisplayManagerPathsFailedOrInvalidatedEventArgs) 

事件類型

適用於