ClassTheme
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
Theme()
Declaration
public Theme()
Properties
Name
Gets or sets the name of the theme.
Declaration
[XamlSerializable("Office Theme")]
public string Name { get; set; }
Property Value
A string representing the name of the theme.
ThemeColorMapping
Represents the color mapping for a theme in Telerik's document model.
Declaration
[XamlCompositePropertySerializable]
public ThemeColorMapping ThemeColorMapping { get; set; }
Property Value
ThemeColors
Gets the collection of theme colors associated with the theme.
Declaration
[XamlCompositePropertySerializable]
public ThemeColors ThemeColors { get; set; }
Property Value
ThemeFonts
Gets the fonts that are defined in the theme.
Declaration
[XamlCompositePropertySerializable]
public ThemeFonts ThemeFonts { get; set; }
Property Value
Methods
GetColor(ThemeColorsEnum, out Color)
Retrieves the color associated with the specified theme color enumeration.
Declaration
public bool GetColor(ThemeColorsEnum themeColorsEnum, out Color color)
Parameters
themeColorsEnum
The theme color enumeration to retrieve the associated color for.
color
Color
When this method returns, contains the Color associated with the specified theme color.
Returns
Returns true if the color was successfully retrieved; otherwise, false.
GetColorFromHex(string)
Retrieves the color associated with the specified hexadecimal color string.
Declaration
public static Color GetColorFromHex(string hexValue)
Parameters
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.
GetFont(ThemeFontsEnum, out FontFamily)
Retrieves the font associated with the specified theme font enumeration.
Declaration
public bool GetFont(ThemeFontsEnum themeFont, out FontFamily fontFamily)
Parameters
themeFont
The theme font enumeration indicating which font to retrieve.
fontFamily
FontFamily
When this method returns, contains the FontFamily associated with the specified font enumeration.
Returns
Returns a boolean value indicating whether the font was successfully retrieved.