共用方式為


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);
}

適用於