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

事件类型

实现

注解

可以订阅此事件,以便当 SystemBackdropState 在 和 Fallback/High Contrast之间Active更改时收到通知。 例如,你可能想要根据系统背景材料状态更新其他非系统背景 UI。

适用于

另请参阅