Skip to content

ThemeSwitcher class

Defined in

Namespace: CrissCross.WPF.UI.Controls Assembly: CrissCross.WPF.UI.dll Full name: CrissCross.WPF.UI.Controls.ThemeSwitcher Modifiers: public

Summary

        Represents a theme preference picker over the platform theme service.
        

Applies to

net10.0-windows10.0.19041, net9.0-windows10.0.19041, net8.0-windows10.0.19041, net481

Class hierarchy
classDiagram
class ThemeSwitcher
class Control
Control <|-- ThemeSwitcher

Inherits from: Control

Constructors

NameSummary
.ctorInitializes a new instance of the [ThemeSwitcher](# class.

Properties

NameSummary
SelectedChoiceGets or sets the selected theme preference.
SystemChoiceGets or sets the current concrete system theme.
SupportsHighContrastGets or sets a value indicating whether high contrast should be offered.
CurrentStateGets or sets the current resolved theme preference state.
ThemeServiceGets or sets the optional platform theme service used when applying a choice.
ThemeChangedCommandGets or sets a command invoked with the selected theme choice after a theme is applied.
ApplyThemeCommandGets the command that applies a selected theme choice.

Fields

NameSummary
static SelectedChoicePropertyProperty for [SelectedChoice](#
static SystemChoicePropertyProperty for [SystemChoice](#
static SupportsHighContrastPropertyProperty for [SupportsHighContrast](#
static CurrentStatePropertyProperty for [CurrentState](#
static ThemeServicePropertyProperty for [ThemeService](#
static ThemeChangedCommandPropertyProperty for [ThemeChangedCommand](#

Methods

NameSummary
CreateStateCreates a platform-neutral theme preference state from the current control inputs.
ApplyChoiceApplies a theme choice and emits the current state.
Inherited members