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¶
| Name | Summary |
|---|---|
| .ctor | Initializes a new instance of the [ThemeSwitcher](# class. |
Properties¶
| Name | Summary |
|---|---|
| SelectedChoice | Gets or sets the selected theme preference. |
| SystemChoice | Gets or sets the current concrete system theme. |
| SupportsHighContrast | Gets or sets a value indicating whether high contrast should be offered. |
| CurrentState | Gets or sets the current resolved theme preference state. |
| ThemeService | Gets or sets the optional platform theme service used when applying a choice. |
| ThemeChangedCommand | Gets or sets a command invoked with the selected theme choice after a theme is applied. |
| ApplyThemeCommand | Gets the command that applies a selected theme choice. |
Fields¶
| Name | Summary |
|---|---|
| static SelectedChoiceProperty | Property for [SelectedChoice](# |
| static SystemChoiceProperty | Property for [SystemChoice](# |
| static SupportsHighContrastProperty | Property for [SupportsHighContrast](# |
| static CurrentStateProperty | Property for [CurrentState](# |
| static ThemeServiceProperty | Property for [ThemeService](# |
| static ThemeChangedCommandProperty | Property for [ThemeChangedCommand](# |
Methods¶
| Name | Summary |
|---|---|
| CreateState | Creates a platform-neutral theme preference state from the current control inputs. |
| ApplyChoice | Applies a theme choice and emits the current state. |