Class
XmlTheme

Represents a theme for a telerik control. Themes can be serialized and deserialized, thus saving and loading the theme for a given control. XmlTheme implements IXmlSerializable which provides custom formatting for XML serialization and deserialization.

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

cs-api-definition
public class XmlTheme : IXmlSerializable

Inheritance: objectXmlTheme

Implements: IXmlSerializable

Constructors

XmlTheme()

Initializes a new instance of the XmlTheme class.

Declaration

cs-api-definition
public XmlTheme()

XmlTheme(XmlStyleSheet, string, string)

Initializes a new instance of the XmlTheme class from XmlStyleSheet, control type, and element type.

Declaration

cs-api-definition
public XmlTheme(XmlStyleSheet style, string controlType, string elementType)

Parameters

style

XmlStyleSheet

controlType

string

elementType

string

Properties

BuilderRegistrations

Gets or sets the Builder Registration for the theme. Each builder registration corresponds to a theme for single telerik control.

Declaration

cs-api-definition
public XmlStyleBuilderRegistration[] BuilderRegistrations { get; set; }

Property Value

XmlStyleBuilderRegistration[]

HasRepository

Gets value indicating whether this XmlTheme defines StyleRepository

Declaration

cs-api-definition
public bool HasRepository { get; }

Property Value

bool

StyleRepository

Get the StyleRepository associated with this theme. StyleReposity contains named lists of PropertySettings, reffered by Key property, that can be inherited by the PropertySettingGroups of this theme. This is done by associating BsedOn property of the property setting group with PropertySettings list key. Since each theme can have only one repository, when different XmlTheme are registered with repositories ThemeResolutionService for the same theme the repositories are merged. If a PropertySettings list with the same Key is defined in several XmlTheme repository instances, the last laoded one overrides any existing list.

Declaration

cs-api-definition
public XmlStyleRepository StyleRepository { get; }

Property Value

XmlStyleRepository

ThemeName

Gets or sets a string value indicating the theme name.

Declaration

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

Property Value

string

ThemeVersion

Declaration

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

Property Value

string

Methods

Deserialize()

Declaration

cs-api-definition
public Theme Deserialize()

Returns

Theme

DeserializePartially(XmlReader)

Declaration

cs-api-definition
public void DeserializePartially(XmlReader reader)

Parameters

reader

XmlReader

DeserializeType(string)

Deserializes the provided deserialization string.

Declaration

cs-api-definition
public static Type DeserializeType(string className)

Parameters

className

string

Returns

Type

LoadFromReader(TextReader)

Load a XML theme from a TextReader.

Declaration

cs-api-definition
public static XmlTheme LoadFromReader(TextReader reader)

Parameters

reader

TextReader

Returns

XmlTheme

LoadFromReader(XmlReader)

Loads a theme from a XML reader.

Declaration

cs-api-definition
public static XmlTheme LoadFromReader(XmlReader reader)

Parameters

reader

XmlReader

Returns

XmlTheme

LoadFromStram(Stream)

Loads a theme from a System.IO.Stream instance.

Declaration

cs-api-definition
public static XmlTheme LoadFromStram(Stream stream)

Parameters

stream

Stream

Returns

XmlTheme

SaveToStream(Stream)

Declaration

cs-api-definition
public void SaveToStream(Stream stream)

Parameters

stream

Stream

SaveToWriter(XmlWriter)

Saves the theme to a XMLWriter.

Declaration

cs-api-definition
public void SaveToWriter(XmlWriter writer)

Parameters

writer

XmlWriter

SerializeType(Type)

Retrieves the serialization string of the given type.

Declaration

cs-api-definition
public static string SerializeType(Type value)

Parameters

value

Type

Returns

string