New to Telerik UI for WPFStart a free 30-day trial

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:

C#
public class ThemeFonts

Inheritance: objectThemeFonts

Constructors

C#
public ThemeFonts()

Properties

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

C#
public bool IsDefault { get; }
Property Value:

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.

C#
[XamlSerializable("Cambria")]
public FontFamily Major { get; set; }

Minor

FontFamily

Gets the minor font settings associated with the theme.

C#
[XamlSerializable("Calibri")]
public FontFamily Minor { get; set; }

Gets or sets the name of the theme fonts.

C#
[XamlSerializable("Office")]
public string Name { get; set; }
Property Value:

The name of the theme fonts as a string.

Methods

Retrieves the font associated with the specified theme font enumeration.

C#
public bool GetFont(ThemeFontsEnum themeFont, out FontFamily fontFamily)
Parameters:themeFontThemeFontsEnum

The theme font enumeration to retrieve the corresponding font.

fontFamilyFontFamily

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.

Retrieves the theme fonts enumeration based on the specified font name.

C#
public static ThemeFontsEnum? GetThemeFontsEnum(string themeFontName)
Parameters:themeFontNamestring

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.