[]
        
(Showing Draft Content)

C1.Framework.Theme

Theme Class

Class that contains a keyed collection of Style objects and methods to serialize the styles into Xml files and streams.

Namespace: C1.Framework
Assembly: C1.Win.8.dll
Syntax
public class Theme : KeyedCollection<string, Style>, IList<Style>, ICollection<Style>, IList, ICollection, IReadOnlyList<Style>, IReadOnlyCollection<Style>, IEnumerable<Style>, IEnumerable
Remarks

The Theme class is a named/keyed collection of Style objects.

The class is designed to be used as a base class for components that need to add custom elements to themes in addition to a style collection.

Inheritors should override the following methods:

// specify the name of the component that will use this theme
protected virtual string ComponentType

// save component-specific elements to xml
protected virtual void WriteCustomData(XmlWriter writer)

// load component-specific elements from xml
protected virtual void ReadCustomData(XmlNode node)

Constructors

Name Description
Theme()

Initializes a new instance of a Theme.

Theme(string)

Initializes a new instance of a Theme.

Properties

Name Description
ComponentType

Gets or sets the name of the component that owns the theme (e.g., "C1Schedule", "C1Calendar" or "C1Ribbon").

Name

Gets or sets the theme name (e.g. "RedMoon");

Methods

Name Description
GetKeyForItem(Style)

Styles are indexed by style name.

LoadImage(XmlNode)

Loads an image from the Xml stream.

LoadThemes(string)

Loads a collection of themes from an Xml file.

ReadCustomData(XmlNode)

Reads component-specific theme data.

ReadXml(Stream)

Reads this Theme from an Xml Stream.

ReadXml(string)

Reads this Theme from an Xml file.

ReadXml(XmlNode)

Reads this Theme from an System.Xml.XmlNode.

ReadXml(XmlReader)

Reads this Theme from an System.Xml.XmlReader.

ReadXmlString(string)

Reads this Theme from an Xml string.

SaveImage(XmlWriter, string, Image)

Saves an image into the Xml output stream.

SaveThemes(Theme[], string)

Saves a collection of themes into an Xml file.

WriteCustomData(XmlWriter)

Writes component-specific data into the theme.

WriteXml(Stream)

Writes this Theme into an Xml Stream.

WriteXml(string)

Writes this Theme into an Xml file.

WriteXml(XmlWriter)

Writes this Theme into an System.Xml.XmlWriter.