Taal

AccessibilitySettings.HighContrastChanged Event

Definition

Occurs when the system high contrast feature turns on or off.

// Register
event_token HighContrastChanged(TypedEventHandler<AccessibilitySettings, IInspectable const&> const& handler) const;

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

// Revoke with event_revoker
AccessibilitySettings::HighContrastChanged_revoker HighContrastChanged(auto_revoke_t, TypedEventHandler<AccessibilitySettings, IInspectable const&> const& handler) const;
public event TypedEventHandler<AccessibilitySettings,object> HighContrastChanged;
function onHighContrastChanged(eventArgs) { /* Your code */ }
accessibilitySettings.addEventListener("highcontrastchanged", onHighContrastChanged);
accessibilitySettings.removeEventListener("highcontrastchanged", onHighContrastChanged);
- or -
accessibilitySettings.onhighcontrastchanged = onHighContrastChanged;
Public Custom Event HighContrastChanged As TypedEventHandler(Of AccessibilitySettings, Object) 

Event Type

Remarks

Warning

This event depends on a CoreWindow for the current thread. WinUI 3 desktop windows aren't backed by CoreWindow, so don't use this event in a WinUI 3 desktop app. In Windows App SDK 1.4 and later, use the ThemeSettings.Changed event instead. Create a ThemeSettings object for your app window by calling ThemeSettings.CreateForWindowId, and retain a reference to the object for as long as you want to receive change notifications.

Applies to