Class ApplicationAccentColorManager
- Namespace
- Wpf.Ui.Appearance
- Assembly
- Wpf.Ui.dll
Allows updating the accents used by controls in the application by swapping dynamic resources.
public static class ApplicationAccentColorManager
- Inheritance
-
ApplicationAccentColorManager
- Inherited Members
Examples
ApplicationAccentColorManager.Apply(
Color.FromArgb(0xFF, 0xEE, 0x00, 0xBB),
ApplicationTheme.Dark,
false
);
ApplicationAccentColorManager.Apply(
ApplicationAccentColorManager.GetColorizationColor(),
ApplicationTheme.Dark,
false
);
Properties
PrimaryAccent
Gets the SystemAccentColorPrimary.
public static Color PrimaryAccent { get; }
Property Value
PrimaryAccentBrush
Gets the Brush of the SystemAccentColorPrimary.
public static Brush PrimaryAccentBrush { get; }
Property Value
SecondaryAccent
Gets the SystemAccentColorSecondary.
public static Color SecondaryAccent { get; }
Property Value
SecondaryAccentBrush
Gets the Brush of the SystemAccentColorSecondary.
public static Brush SecondaryAccentBrush { get; }
Property Value
SystemAccent
Gets the SystemAccentColor.
public static Color SystemAccent { get; }
Property Value
SystemAccentBrush
Gets the Brush of the SystemAccentColor.
public static Brush SystemAccentBrush { get; }
Property Value
TertiaryAccent
Gets the SystemAccentColorTertiary.
public static Color TertiaryAccent { get; }
Property Value
TertiaryAccentBrush
Gets the Brush of the SystemAccentColorTertiary.
public static Brush TertiaryAccentBrush { get; }
Property Value
Methods
Apply(Color, Color, Color, Color)
Changes the color accents of the application based on the entered colors.
public static void Apply(Color systemAccent, Color primaryAccent, Color secondaryAccent, Color tertiaryAccent)
Parameters
systemAccent
ColorPrimary color.
primaryAccent
ColorAlternative light or dark color.
secondaryAccent
ColorSecond alternative light or dark color (most used).
tertiaryAccent
ColorThird alternative light or dark color.
Apply(Color, ApplicationTheme, bool)
Changes the color accents of the application based on the color entered.
public static void Apply(Color systemAccent, ApplicationTheme applicationTheme = ApplicationTheme.Light, bool systemGlassColor = false)
Parameters
systemAccent
ColorPrimary accent color.
applicationTheme
ApplicationThemeIf Dark, the colors will be different.
systemGlassColor
boolIf the color is taken from the Glass Color System, its brightness will be increased with the help of the operations on HSV space.
ApplySystemAccent()
Applies system accent color to the application.
public static void ApplySystemAccent()
GetColorizationColor()
Gets current Desktop Window Manager colorization color.
It should be the color defined in the system Personalization.
public static Color GetColorizationColor()