Table of Contents

Interface IThemeService

Namespace
Wpf.Ui
Assembly
Wpf.Ui.dll

Represents a contract with a service that provides tools for manipulating the theme.

public interface IThemeService

Methods

GetNativeSystemTheme()

Gets current system theme.

SystemTheme GetNativeSystemTheme()

Returns

SystemTheme

Currently set Windows theme using system enumeration.

GetSystemTheme()

Gets current system theme.

ApplicationTheme GetSystemTheme()

Returns

ApplicationTheme

Currently set Windows theme.

GetTheme()

Gets current application theme.

ApplicationTheme GetTheme()

Returns

ApplicationTheme

Currently set application theme.

SetAccent(Color)

Sets current application accent.

bool SetAccent(Color accentColor)

Parameters

accentColor Color

Returns

bool

true if the operation succeeds. false otherwise.

SetAccent(SolidColorBrush)

Sets current application accent.

bool SetAccent(SolidColorBrush accentSolidBrush)

Parameters

accentSolidBrush SolidColorBrush

Returns

bool

true if the operation succeeds. false otherwise.

SetSystemAccent()

Sets currently used Windows OS accent.

bool SetSystemAccent()

Returns

bool

true if the operation succeeds. false otherwise.

SetTheme(ApplicationTheme)

Sets current application theme.

bool SetTheme(ApplicationTheme applicationTheme)

Parameters

applicationTheme ApplicationTheme

Theme type to set.

Returns

bool

true if the operation succeeds. false otherwise.