Class
Theme

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

cs-api-definition
public class Theme : ICloneable

Inheritance: objectTheme

Implements: ICloneable

Constructors

Theme()

Initializes a new instance of the Theme class.

Declaration

cs-api-definition
public Theme()

Theme(string)

Initializes a new instance of the Theme class.

Declaration

cs-api-definition
public Theme(string name)

Parameters

name

string

The name of the theme.

Properties

DesignTimeVisible

Gets or sets a value indicating whether the theme should be visible at design time. This property value is not serialized.

Declaration

cs-api-definition
public bool DesignTimeVisible { get; set; }

Property Value

bool

Name

Gets or sets the name of the theme.

Declaration

cs-api-definition
public string Name { get; set; }

Property Value

string

Repositories

Gets a collection containing the repositiories for the theme.

Declaration

cs-api-definition
public List<StyleRepository> Repositories { get; }

Property Value

List<StyleRepository>

StyleGroups

Gets a collection containing the style groups for the theme.

Declaration

cs-api-definition
public List<StyleGroup> StyleGroups { get; }

Property Value

List<StyleGroup>

Methods

BorderPropertyMapper(string, RadObject)

Declaration

cs-api-definition
public static string BorderPropertyMapper(string propertyName, RadObject targetObject)

Parameters

propertyName

string

targetObject

RadObject

Returns

string

Clone()

Creates a new cloned version of the class.

Declaration

cs-api-definition
public object Clone()

Returns

object

A new instance of the Theme class

Implements ICloneable.Clone()

Combine(Theme, bool, bool)

Combines two themes.

Declaration

cs-api-definition
public void Combine(Theme theme, bool mergeRepositories, bool replaceExistingStyles)

Parameters

theme

Theme

The source theme.

mergeRepositories

bool

Determines whether to merge repositories.

replaceExistingStyles

bool

Determines whether to replace existing styles.

FindRepository(string)

Searches for a StyleRepository based on its key.

Declaration

cs-api-definition
public StyleRepository FindRepository(string key)

Parameters

key

string

The repository key to search for.

Returns

StyleRepository

An instance of StyleRepository if successfull

FindStyleGroup(Control)

Searches for a StyleGroup for a specified control.

Declaration

cs-api-definition
public StyleGroup FindStyleGroup(Control control)

Parameters

control

Control

The control to search for.

Returns

StyleGroup

An instance of StyleGroup if successfull.

FindStyleGroup(IStylableNode)

Searches for a StyleGroup for a specified stylable node.

Declaration

cs-api-definition
public StyleGroup FindStyleGroup(IStylableNode item)

Parameters

item

IStylableNode

The stylable node to search for.

Returns

StyleGroup

An instance of StyleGroup if successfull.

FindStyleGroup(string)

Searches for a StyleGroup based on the control type.

Declaration

cs-api-definition
public StyleGroup FindStyleGroup(string controlType)

Parameters

controlType

string

The control type to search for.

Returns

StyleGroup

An instance of StyleGroup if successfull.

IsCompatible(string)

Determines whether this theme is compatible with the specified theme name.

Declaration

cs-api-definition
public bool IsCompatible(string themeName)

Parameters

themeName

string

Theme name to compare with.

Returns

bool

true if successfull.

MergeRepositories()

Relates repositories with style groups.

Declaration

cs-api-definition
public void MergeRepositories()

ReadCSS(string)

Creates a new theme by reading a CSS like file.

Declaration

cs-api-definition
public static Theme ReadCSS(string filePath)

Parameters

filePath

string

The file location.

Returns

Theme

An instance of Theme if successfull.

ReadCSSText(string)

Creates a new theme by reading a CSS like formatted text.

Declaration

cs-api-definition
public static Theme ReadCSSText(string text)

Parameters

text

string

The text containing a theme in CSS style syntax.

Returns

Theme

An instance of Theme if successfull.

ReadFile(string)

Creates a new theme by reading a file. The function determines the correct file format by using file extension.

Declaration

cs-api-definition
public static Theme ReadFile(string filePath)

Parameters

filePath

string

The file location.

Returns

Theme

An instance of Theme if successfull.

ReadResource(Assembly, string)

Creates a new theme by loading it from a resource. The function determines the correct file format by using file extension.

Declaration

cs-api-definition
public static Theme ReadResource(Assembly resourceAssembly, string resourcePath)

Parameters

resourceAssembly

Assembly

The assembly to load from.

resourcePath

string

The location of the resource.

Returns

Theme

An instance of Theme if successfull.

ReadTSSP(string)

Creates a new theme by reading a TSSP file.

Declaration

cs-api-definition
public static Theme ReadTSSP(string filePath)

Parameters

filePath

string

The file location.

Returns

Theme

An instance of Theme if successfull.

ReadXML(string)

Creates a new theme by reading an XML file.

Declaration

cs-api-definition
public static Theme ReadXML(string filePath)

Parameters

filePath

string

The file location.

Returns

Theme

An instance of Theme if successfull.