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

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:

C#
public class XmlTheme : IXmlSerializable

Inheritance: objectXmlTheme

Implements: IXmlSerializable

Constructors

Initializes a new instance of the XmlTheme class.

C#
public XmlTheme()

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

C#
public XmlTheme(XmlStyleSheet style, string controlType, string elementType)
Parameters:styleXmlStyleSheetcontrolTypestringelementTypestring

Properties

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

C#
public XmlStyleBuilderRegistration[] BuilderRegistrations { get; set; }

Gets value indicating whether this XmlTheme defines StyleRepository

C#
public bool HasRepository { get; }

StyleRepository

XmlStyleRepository

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.

C#
public XmlStyleRepository StyleRepository { get; }

Gets or sets a string value indicating the theme name.

C#
public string ThemeName { get; set; }
C#
public string ThemeVersion { get; set; }

Methods

C#
public Theme Deserialize()
Returns:

Theme

C#
public void DeserializePartially(XmlReader reader)
Parameters:readerXmlReader

Deserializes the provided deserialization string.

C#
public static Type DeserializeType(string className)
Parameters:classNamestringReturns:

Type

Load a XML theme from a TextReader.

C#
public static XmlTheme LoadFromReader(TextReader reader)
Parameters:readerTextReaderReturns:

XmlTheme

Loads a theme from a XML reader.

C#
public static XmlTheme LoadFromReader(XmlReader reader)
Parameters:readerXmlReaderReturns:

XmlTheme

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

C#
public static XmlTheme LoadFromStram(Stream stream)
Parameters:streamStreamReturns:

XmlTheme

C#
public void SaveToStream(Stream stream)
Parameters:streamStream

Saves the theme to a XMLWriter.

C#
public void SaveToWriter(XmlWriter writer)
Parameters:writerXmlWriter

Retrieves the serialization string of the given type.

C#
public static string SerializeType(Type value)
Parameters:valueTypeReturns:

string