BrightnessOverride.IsOverrideActiveChanged 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
發生于螢幕亮度等級開始比對或停止以符合覆寫亮度等級時。 當 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)
事件類型
TypedEventHandler<BrightnessOverride,IInspectable>
範例
這個範例示範如何使用 IsOverrideActiveChanged 事件和 OnIsOverrideActiveChanged 事件處理常式來通知使用者亮度覆寫物件是否確實控制螢幕亮度。
bo.IsOverrideActiveChanged += OnIsOverrideActiveChanged;
...
private void OnIsOverrideActiveChanged(BrightnessOverride sender, object e)
{
rootPage.NotifyUser("Brightness override is " + (sender.IsOverrideActive ? "active" : "not active"), NotifyType.StatusMessage);
}