共用方式為


ISystemBackdropControllerWithTargets.StateChanged 事件

定義

發生于系統背景狀態已變更時。

// Register
event_token StateChanged(TypedEventHandler<ISystemBackdropControllerWithTargets, IInspectable const&> const& handler) const;

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

// Revoke with event_revoker
ISystemBackdropControllerWithTargets::StateChanged_revoker StateChanged(auto_revoke_t, TypedEventHandler<ISystemBackdropControllerWithTargets, IInspectable const&> const& handler) const;
event TypedEventHandler<ISystemBackdropControllerWithTargets,object> StateChanged;
function onStateChanged(eventArgs) { /* Your code */ }
iSystemBackdropControllerWithTargets.addEventListener("statechanged", onStateChanged);
iSystemBackdropControllerWithTargets.removeEventListener("statechanged", onStateChanged);
- or -
iSystemBackdropControllerWithTargets.onstatechanged = onStateChanged;
Event StateChanged As TypedEventHandler(Of ISystemBackdropControllerWithTargets, Object) 

事件類型

備註

您可以在 和 之間 High Contrast/FallbackActive 變更SystemBackdropState時訂閱此事件,以收到通知。 例如,您可能有其他想要根據系統基礎材料狀態更新的非系統基礎 UI。

適用於

另請參閱