Share via


BrightnessOverride.IsOverrideActiveChanged Event

Definition

Occurs when the screen brightness level either starts to match or stops to match the override brightness level. This event is raised when the IsOverrideActive property changes state.

// 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) 

Event Type

Examples

This example shows how to use the IsOverrideActiveChanged event and the OnIsOverrideActiveChanged event handler to notify the user whether or not the brightness override object is in fact controlling the screen brightness.

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

Applies to