共用方式為


DesktopAcrylicController.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
DesktopAcrylicController::StateChanged_revoker StateChanged(auto_revoke_t, TypedEventHandler<ISystemBackdropControllerWithTargets, IInspectable const&> const& handler) const;
public event TypedEventHandler<ISystemBackdropControllerWithTargets,object> StateChanged;
function onStateChanged(eventArgs) { /* Your code */ }
desktopAcrylicController.addEventListener("statechanged", onStateChanged);
desktopAcrylicController.removeEventListener("statechanged", onStateChanged);
- or -
desktopAcrylicController.onstatechanged = onStateChanged;
Public Custom Event StateChanged As TypedEventHandler(Of ISystemBackdropControllerWithTargets, Object) Implements StateChanged

事件類型

實作

備註

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

適用於

另請參閱