New to Telerik UI for WinFormsStart a free 30-day trial

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

C#
public class ThemeRepository

Inheritance: objectThemeRepository

Constructors

C#
public ThemeRepository()

Properties

Gets a list with all theme names that are available.

C#
public static IEnumerable<string> AvailableThemeNames { get; }

Gets or sets the default control theme.

C#
public static Theme ControlDefault { get; set; }

Gets a list with all loaded themes.

C#
public static ICollection LoadedThemes { get; }

Methods

Adds a new theme to the repository.

C#
public static void Add(Theme theme, bool replaceExistingStyle)
Parameters:themeTheme

The theme to add.

replaceExistingStylebool

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

Adds a new theme to the repository.

C#
public static void Add(Theme theme)
Parameters:themeTheme

The theme to add.

Searches for a theme with specific name.

C#
public static Theme FindTheme(string themeName, bool fallbackToControlDefault)
Parameters:themeNamestring

The theme name to search for.

fallbackToControlDefaultbool

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

Returns:

Theme

an instance of Theme if successfull.

Searches for a theme with specific name.

C#
public static Theme FindTheme(string themeName)
Parameters:themeNamestring

The theme name to search for.

Returns:

Theme

an instance of Theme if successfull.

Registers a theme without loading it.

C#
public static void RegisterTheme(RadThemeComponentBase theme)
Parameters:themeRadThemeComponentBase

The theme component to register

Removes a theme from the repository.

C#
public static void Remove(string themeName)
Parameters:themeNamestring

The theme to remove.