ClassThemeFonts
Represents a collection of theme fonts used in a document model. Provides access to major and minor font families, the theme font name, and utility methods for retrieving and identifying theme fonts. Implements ISupportShouldSerialize to support conditional serialization based on whether the theme fonts are set to their default values.
Definition
Namespace:Telerik.Windows.Documents.Model.Themes
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
public class ThemeFonts
Inheritance: objectThemeFonts
Constructors
ThemeFonts()
Declaration
public ThemeFonts()
Properties
IsDefault
Gets a value indicating whether the theme fonts are set as default.
Declaration
public bool IsDefault { get; }
Property Value
true if the theme fonts are default; otherwise, false.
Major
Gets the major font used in the theme for the document. This property provides access to the typographic style of the primary text, which can influence the overall appearance of the document.
Declaration
[XamlSerializable("Cambria")]
public FontFamily Major { get; set; }
Property Value
FontFamily
Minor
Gets the minor font settings associated with the theme.
Declaration
[XamlSerializable("Calibri")]
public FontFamily Minor { get; set; }
Property Value
FontFamily
Methods
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 to retrieve the corresponding font.
fontFamily
FontFamily
When this method returns, contains the FontFamily associated with the specified theme font enumeration.
Returns
Returns a boolean value indicating whether the font was successfully retrieved.
GetThemeFontsEnum(string)
Retrieves the theme fonts enumeration based on the specified font name.
Declaration
public static ThemeFontsEnum? GetThemeFontsEnum(string themeFontName)
Parameters
themeFontName
The name of the font for which to retrieve the theme fonts enumeration.
Returns
A value of type T representing the theme fonts enumeration associated with the specified font name.