Table of Contents

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

Color

PrimaryAccentBrush

Gets the Brush of the SystemAccentColorPrimary.

public static Brush PrimaryAccentBrush { get; }

Property Value

Brush

SecondaryAccent

Gets the SystemAccentColorSecondary.

public static Color SecondaryAccent { get; }

Property Value

Color

SecondaryAccentBrush

Gets the Brush of the SystemAccentColorSecondary.

public static Brush SecondaryAccentBrush { get; }

Property Value

Brush

SystemAccent

Gets the SystemAccentColor.

public static Color SystemAccent { get; }

Property Value

Color

SystemAccentBrush

Gets the Brush of the SystemAccentColor.

public static Brush SystemAccentBrush { get; }

Property Value

Brush

TertiaryAccent

Gets the SystemAccentColorTertiary.

public static Color TertiaryAccent { get; }

Property Value

Color

TertiaryAccentBrush

Gets the Brush of the SystemAccentColorTertiary.

public static Brush TertiaryAccentBrush { get; }

Property Value

Brush

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 Color

Primary color.

primaryAccent Color

Alternative light or dark color.

secondaryAccent Color

Second alternative light or dark color (most used).

tertiaryAccent Color

Third 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 Color

Primary accent color.

applicationTheme ApplicationTheme

If Dark, the colors will be different.

systemGlassColor bool

If 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()

Returns

Color