AccessibilitySettings.HighContrastChanged Événement
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Se produit lorsque la fonctionnalité à contraste élevé système est activée ou désactivée.
// 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)
Type d’événement
TypedEventHandler<AccessibilitySettings,IInspectable>
Remarques
Avertissement
Cet événement dépend d’un CoreWindow pour le thread actuel. Les fenêtres de bureau WinUI 3 ne sont pas sauvegardées par CoreWindow. N’utilisez donc pas cet événement dans une application de bureau WinUI 3. Dans SDK d'application Windows 1.4 et versions ultérieures, utilisez l’événement ThemeSettings.Changed à la place. Créez un objet ThemeSettings pour votre fenêtre d’application en appelant ThemeSettings.CreateForWindowId et conservez une référence à l’objet tant que vous souhaitez recevoir des notifications de modification.