BrightnessOverride.IsOverrideActiveChanged 事件

定义

当屏幕亮度级别开始匹配或停止以匹配覆盖亮度级别时发生。 当 IsOverrideActive 属性更改状态时,将引发此事件。

// Register
event_token IsOverrideActiveChanged(TypedEventHandler<BrightnessOverride, IInspectable const&> const& handler) const;

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

// Revoke with event_revoker
BrightnessOverride::IsOverrideActiveChanged_revoker IsOverrideActiveChanged(auto_revoke_t, TypedEventHandler<BrightnessOverride, IInspectable const&> const& handler) const;
public event TypedEventHandler<BrightnessOverride,object> IsOverrideActiveChanged;
function onIsOverrideActiveChanged(eventArgs) { /* Your code */ }
brightnessOverride.addEventListener("isoverrideactivechanged", onIsOverrideActiveChanged);
brightnessOverride.removeEventListener("isoverrideactivechanged", onIsOverrideActiveChanged);
- or -
brightnessOverride.onisoverrideactivechanged = onIsOverrideActiveChanged;
Public Custom Event IsOverrideActiveChanged As TypedEventHandler(Of BrightnessOverride, Object) 

事件类型

示例

此示例演示如何使用 IsOverrideActiveChanged 事件和 OnIsOverrideActiveChanged 事件处理程序通知用户亮度覆盖对象是否实际上控制屏幕亮度。

bo.IsOverrideActiveChanged += OnIsOverrideActiveChanged;
...
private void OnIsOverrideActiveChanged(BrightnessOverride sender, object e)
{
    rootPage.NotifyUser("Brightness override is " + (sender.IsOverrideActive ? "active" : "not active"),   NotifyType.StatusMessage);
}

适用于