Class
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:

cs-api-definition
public class ThemeFonts

Inheritance: objectThemeFonts

Constructors

ThemeFonts()

Declaration

cs-api-definition
public ThemeFonts()

Properties

IsDefault

Gets a value indicating whether the theme fonts are set as default.

Declaration

cs-api-definition
public bool IsDefault { get; }

Property Value

bool

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

cs-api-definition
[XamlSerializable("Cambria")]
public FontFamily Major { get; set; }

Property Value

FontFamily

Minor

Gets the minor font settings associated with the theme.

Declaration

cs-api-definition
[XamlSerializable("Calibri")]
public FontFamily Minor { get; set; }

Property Value

FontFamily

Name

Gets or sets the name of the theme fonts.

Declaration

cs-api-definition
[XamlSerializable("Office")]
public string Name { get; set; }

Property Value

string

The name of the theme fonts as a string.

Methods

GetFont(ThemeFontsEnum, out FontFamily)

Retrieves the font associated with the specified theme font enumeration.

Declaration

cs-api-definition
public bool GetFont(ThemeFontsEnum themeFont, out FontFamily fontFamily)

Parameters

themeFont

ThemeFontsEnum

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

bool

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

cs-api-definition
public static ThemeFontsEnum? GetThemeFontsEnum(string themeFontName)

Parameters

themeFontName

string

The name of the font for which to retrieve the theme fonts enumeration.

Returns

ThemeFontsEnum?

A value of type T representing the theme fonts enumeration associated with the specified font name.