Table of Contents

Class ThemeService

Namespace
Wpf.Ui
Assembly
Wpf.Ui.dll

Lets you set the app theme.

public class ThemeService : IThemeService
Inheritance
ThemeService
Implements
Inherited Members

Methods

GetNativeSystemTheme()

Gets current system theme.

public virtual SystemTheme GetNativeSystemTheme()

Returns

SystemTheme

Currently set Windows theme using system enumeration.

GetSystemTheme()

Gets current system theme.

public virtual ApplicationTheme GetSystemTheme()

Returns

ApplicationTheme

Currently set Windows theme.

GetTheme()

Gets current application theme.

public virtual ApplicationTheme GetTheme()

Returns

ApplicationTheme

Currently set application theme.

SetAccent(Color)

Sets current application accent.

public bool SetAccent(Color accentColor)

Parameters

accentColor Color

Returns

bool

true if the operation succeeds. false otherwise.

SetAccent(SolidColorBrush)

Sets current application accent.

public bool SetAccent(SolidColorBrush accentSolidBrush)

Parameters

accentSolidBrush SolidColorBrush

Returns

bool

true if the operation succeeds. false otherwise.

SetSystemAccent()

Sets currently used Windows OS accent.

public bool SetSystemAccent()

Returns

bool

true if the operation succeeds. false otherwise.

SetTheme(ApplicationTheme)

Sets current application theme.

public virtual bool SetTheme(ApplicationTheme applicationTheme)

Parameters

applicationTheme ApplicationTheme

Theme type to set.

Returns

bool

true if the operation succeeds. false otherwise.