Table of Contents

Class WindowBackgroundManager

Namespace
Wpf.Ui.Appearance
Assembly
Wpf.Ui.dll

Facilitates the management of the window background.

public static class WindowBackgroundManager
Inheritance
WindowBackgroundManager
Inherited Members

Examples

WindowBackgroundManager.UpdateBackground(
    observedWindow.RootVisual,
    currentApplicationTheme,
    observedWindow.Backdrop
);

Methods

ApplyDarkThemeToWindow(Window?)

Tries to apply dark theme to Window.

public static void ApplyDarkThemeToWindow(Window? window)

Parameters

window Window

RemoveDarkThemeFromWindow(Window?)

Tries to remove dark theme from Window.

public static void RemoveDarkThemeFromWindow(Window? window)

Parameters

window Window

UpdateBackground(Window?, ApplicationTheme, WindowBackdropType)

Forces change to application background. Required if custom background effect was previously applied.

public static void UpdateBackground(Window? window, ApplicationTheme applicationTheme, WindowBackdropType backdrop)

Parameters

window Window
applicationTheme ApplicationTheme
backdrop WindowBackdropType

UpdateBackground(Window?, ApplicationTheme, WindowBackdropType, bool)

[Obsolete("Use UpdateBackground(Window, ApplicationTheme, WindowBackdropType) instead.")]
public static void UpdateBackground(Window? window, ApplicationTheme applicationTheme, WindowBackdropType backdrop, bool forceBackground)

Parameters

window Window
applicationTheme ApplicationTheme
backdrop WindowBackdropType
forceBackground bool