Theme
Represents a theme in the Telerik Document Model. A theme defines the visual styling of documents, including colors, fonts, and other UI elements.
Definition
Namespace:Telerik.Windows.Documents.Model.Themes
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
public class Theme
Inheritance: objectTheme
Constructors
public Theme()
Properties
Gets or sets the name of the theme.
[XamlSerializable("Office Theme")]
public string Name { get; set; }
A string representing the name of the theme.
Represents the color mapping for a theme in Telerik's document model.
[XamlCompositePropertySerializable]
public ThemeColorMapping ThemeColorMapping { get; set; }
Gets the collection of theme colors associated with the theme.
[XamlCompositePropertySerializable]
public ThemeColors ThemeColors { get; set; }
Gets the fonts that are defined in the theme.
[XamlCompositePropertySerializable]
public ThemeFonts ThemeFonts { get; set; }
Methods
Retrieves the color associated with the specified theme color enumeration.
public bool GetColor(ThemeColorsEnum themeColorsEnum, out Color color)
The theme color enumeration to retrieve the associated color for.
colorColorWhen this method returns, contains the Color associated with the specified theme color.
Returns:Returns true if the color was successfully retrieved; otherwise, false.
Retrieves the color associated with the specified hexadecimal color string.
public static Color GetColorFromHex(string hexValue)
A string representing the color in hexadecimal format (e.g., "#FFFFFF").
Returns:Color
A Color object that corresponds to the provided hexadecimal color string.
Retrieves the font associated with the specified theme font enumeration.
public bool GetFont(ThemeFontsEnum themeFont, out FontFamily fontFamily)
The theme font enumeration indicating which font to retrieve.
fontFamilyFontFamilyWhen this method returns, contains the FontFamily associated with the specified font enumeration.
Returns:Returns a boolean value indicating whether the font was successfully retrieved.