SystemThemeWatcher.Watch(Window?, WindowBackdropType, bool, bool) method¶
Defined in
Type: SystemThemeWatcher
Namespace: CrissCross.WPF.UI.Appearance
Assembly: CrissCross.WPF.UI.dll
Applies to
net10.0-windows10.0.19041, net9.0-windows10.0.19041, net8.0-windows10.0.19041, net481
public static void Watch(Window? window, WindowBackdropType backdrop = Mica, bool updateAccents = true, bool forceBackgroundReplace = false)
Summary: Watches the Window and applies the background effect and theme according to the system theme.
Parameters
| Name | Type | Description |
|---|---|---|
window | Window? | The window that will be updated. |
backdrop = 2 | [WindowBackdropType](# | Background effect to be applied when changing the theme. |
updateAccents = true | bool | If true, the accents will be updated when the change is detected. |
forceBackgroundReplace = false | bool | If true, bypasses the app's theme compatibility check and tries to force the change of a background effect. |