Skip to main content
All docs
V24.2

LightweightTheme.CreateSystemTheme(String, LightweightTheme, LightweightTheme, LightweightTheme, Func<Color, Dictionary<String, Color>>, Func<Color, Dictionary<String, Color>>) Method

Creates a new lightweight theme that reads the Windows app mode.

Namespace: DevExpress.Xpf.Core

Assembly: DevExpress.Xpf.Core.v24.2.dll

NuGet Package: DevExpress.Wpf.Core

Declaration

public static LightweightSystemTheme CreateSystemTheme(
    string name,
    LightweightTheme light,
    LightweightTheme dark,
    LightweightTheme highContrast,
    Func<Color, Dictionary<string, Color>> getAccentColorsLight = null,
    Func<Color, Dictionary<string, Color>> getAccentColorsDark = null
)

Parameters

Name Type Description
name String

The new theme name.

light LightweightTheme

The theme applied for the Light app mode.

dark LightweightTheme

The theme applied for the Dark app mode.

highContrast LightweightTheme

The theme applied if the High Contrast option is enabled.

Optional Parameters

Name Type Default Description
getAccentColorsLight Func<Color, Dictionary<String, Color>> null

The method that returns accent colors for the Light app mode.

getAccentColorsDark Func<Color, Dictionary<String, Color>> null

The method that returns accent colors for the Dark app mode.

Returns

Type Description
LightweightSystemTheme

The new system lightweight theme.

See Also