ThemeFonts
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
public ThemeFonts()
Properties
Gets a value indicating whether the theme fonts are set as default.
public bool IsDefault { get; }
true if the theme fonts are default; otherwise, false.
Major
FontFamily
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.
[XamlSerializable("Cambria")]
public FontFamily Major { get; set; }
Minor
FontFamily
Gets the minor font settings associated with the theme.
[XamlSerializable("Calibri")]
public FontFamily Minor { get; set; }
Methods
Retrieves the font associated with the specified theme font enumeration.
public bool GetFont(ThemeFontsEnum themeFont, out FontFamily fontFamily)
The theme font enumeration to retrieve the corresponding font.
fontFamilyFontFamilyWhen 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.
Retrieves the theme fonts enumeration based on the specified font name.
public static ThemeFontsEnum? GetThemeFontsEnum(string 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.