SystemThemeWatcher
- Assembly:
Fluence.Wpf - Namespace:
Fluence.Wpf
public static class SystemThemeWatcher
Subscribes a Window to high-priority settings change notifications (theme, accent) with debouncing.
Remarks: Used with ApplicationThemeManager to refresh resources when the user changes Windows light/dark or contrast while the app runs.
Methods
UnWatch
public static void UnWatch(Window window)
Stops watching the specified window and removes Win32 hooks.
Parameter window: The window previously passed to Watch.
Exception System.ArgumentNullException: window is null.
Watch
public static void Watch(Window window)
Begins watching the specified window for system theme and accent changes.
Parameter window: The WPF window to associate with the watcher. Must not be null.
Exception System.ArgumentNullException: window is null.