[]
Class that contains a keyed collection of Style objects and methods to serialize the styles into Xml files and streams.
public class Theme : KeyedCollection<string, Style>, IList<Style>, ICollection<Style>, IList, ICollection, IReadOnlyList<Style>, IReadOnlyCollection<Style>, IEnumerable<Style>, IEnumerable
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)
| Name | Description |
|---|---|
| Theme() | Initializes a new instance of a Theme. |
| Theme(string) | Initializes a new instance of a Theme. |
| 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"); |
| 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) | |
| 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) | |
| WriteXml(string) | Writes this Theme into an Xml file. |
| WriteXml(XmlWriter) | Writes this Theme into an System.Xml.XmlWriter. |