Class Theme
Inheritance
Inherited Members
Namespace: Telerik.WinControls
Assembly: Telerik.WinControls.dll
Syntax
public class Theme : ICloneable
Constructors
Theme()
Initializes a new instance of the Theme class.
Declaration
public Theme()
Theme(String)
Initializes a new instance of the Theme class.
Declaration
public Theme(string name)
Parameters
System.String
name
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
public bool DesignTimeVisible { get; set; }
Property Value
System.Boolean
|
Name
Gets or sets the name of the theme.
Declaration
public string Name { get; set; }
Property Value
System.String
|
Repositories
Gets a collection containing the repositiories for the theme.
Declaration
public List<StyleRepository> Repositories { get; }
Property Value
System.Collections.Generic.List<StyleRepository>
|
StyleGroups
Gets a collection containing the style groups for the theme.
Declaration
public List<StyleGroup> StyleGroups { get; }
Property Value
System.Collections.Generic.List<StyleGroup>
|
Methods
BorderPropertyMapper(String, RadObject)
Declaration
public static string BorderPropertyMapper(string propertyName, RadObject targetObject)
Parameters
System.String
propertyName
|
RadObject
targetObject
|
Returns
System.String
|
Clone()
Creates a new cloned version of the class.
Declaration
public object Clone()
Returns
System.Object
A new instance of the Theme class |
Implements
Combine(Theme, Boolean, Boolean)
Combines two themes.
Declaration
public void Combine(Theme theme, bool mergeRepositories, bool replaceExistingStyles)
Parameters
Theme
theme
The source theme. |
System.Boolean
mergeRepositories
Determines whether to merge repositories. |
System.Boolean
replaceExistingStyles
Determines whether to replace existing styles. |
FindRepository(String)
Searches for a StyleRepository based on its key.
Declaration
public StyleRepository FindRepository(string key)
Parameters
System.String
key
The repository key to search for. |
Returns
StyleRepository
An instance of StyleRepository if successfull |
FindStyleGroup(String)
Searches for a StyleGroup based on the control type.
Declaration
public StyleGroup FindStyleGroup(string controlType)
Parameters
System.String
controlType
The control type to search for. |
Returns
StyleGroup
An instance of StyleGroup if successfull. |
FindStyleGroup(Control)
Searches for a StyleGroup for a specified control.
Declaration
public StyleGroup FindStyleGroup(Control control)
Parameters
System.Windows.Forms.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
public StyleGroup FindStyleGroup(IStylableNode item)
Parameters
IStylableNode
item
The stylable node 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
public bool IsCompatible(string themeName)
Parameters
System.String
themeName
Theme name to compare with. |
Returns
System.Boolean
true if successfull. |
MergeRepositories()
Relates repositories with style groups.
Declaration
public void MergeRepositories()
ReadCSS(String)
Creates a new theme by reading a CSS like file.
Declaration
public static Theme ReadCSS(string filePath)
Parameters
System.String
filePath
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
public static Theme ReadCSSText(string text)
Parameters
System.String
text
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
public static Theme ReadFile(string filePath)
Parameters
System.String
filePath
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
public static Theme ReadResource(Assembly resourceAssembly, string resourcePath)
Parameters
System.Reflection.Assembly
resourceAssembly
The assembly to load from. |
System.String
resourcePath
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
public static Theme ReadTSSP(string filePath)
Parameters
System.String
filePath
The file location. |
Returns
Theme
An instance of Theme if successfull. |
ReadXML(String)
Creates a new theme by reading an XML file.
Declaration
public static Theme ReadXML(string filePath)
Parameters
System.String
filePath
The file location. |
Returns
Theme
An instance of Theme if successfull. |