Class
ThemeRepository

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

cs-api-definition
public class ThemeRepository

Inheritance: objectThemeRepository

Constructors

ThemeRepository()

Declaration

cs-api-definition
public ThemeRepository()

Properties

AvailableThemeNames

Gets a list with all theme names that are available.

Declaration

cs-api-definition
public static IEnumerable<string> AvailableThemeNames { get; }

Property Value

IEnumerable<string>

ControlDefault

Gets or sets the default control theme.

Declaration

cs-api-definition
public static Theme ControlDefault { get; set; }

Property Value

Theme

LoadedThemes

Gets a list with all loaded themes.

Declaration

cs-api-definition
public static ICollection LoadedThemes { get; }

Property Value

ICollection

Methods

Add(Theme)

Adds a new theme to the repository.

Declaration

cs-api-definition
public static void Add(Theme theme)

Parameters

theme

Theme

The theme to add.

Add(Theme, bool)

Adds a new theme to the repository.

Declaration

cs-api-definition
public static void Add(Theme theme, bool replaceExistingStyle)

Parameters

theme

Theme

The theme to add.

replaceExistingStyle

bool

Specifies whether to replace all matching styles if a theme with the same name exists.

FindTheme(string)

Searches for a theme with specific name.

Declaration

cs-api-definition
public static Theme FindTheme(string themeName)

Parameters

themeName

string

The theme name to search for.

Returns

Theme

an instance of Theme if successfull.

FindTheme(string, bool)

Searches for a theme with specific name.

Declaration

cs-api-definition
public static Theme FindTheme(string themeName, bool fallbackToControlDefault)

Parameters

themeName

string

The theme name to search for.

fallbackToControlDefault

bool

Sepecifies whether to fallback to control default theme if no other theme is found.

Returns

Theme

an instance of Theme if successfull.

RegisterTheme(RadThemeComponentBase)

Registers a theme without loading it.

Declaration

cs-api-definition
public static void RegisterTheme(RadThemeComponentBase theme)

Parameters

theme

RadThemeComponentBase

The theme component to register

Remove(string)

Removes a theme from the repository.

Declaration

cs-api-definition
public static void Remove(string themeName)

Parameters

themeName

string

The theme to remove.