New to Telerik Document ProcessingStart a free 30-day trial

Font family that can be taken from a theme (major/minor) or set locally and resolved at runtime.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model

Assembly:Telerik.Windows.Documents.Core.dll

Syntax:

C#
public class ThemableFontFamily : IThemableObject<FontFamily>

Inheritance: objectThemableFontFamily

Implements: IThemableObject<FontFamily>

Constructors

Initializes a new instance of the ThemableFontFamily class with a concrete font family.

C#
public ThemableFontFamily(FontFamily fontFamily)
Parameters:fontFamilyFontFamily

The font family.

Initializes a new instance of the ThemableFontFamily class from a family name.

C#
public ThemableFontFamily(string familyName)
Parameters:familyNamestring

Name of the family.

Initializes a new instance that references a theme font role (major/minor).

C#
public ThemableFontFamily(ThemeFontType themeFontType)
Parameters:themeFontTypeThemeFontType

Type of the theme font.

Methods

Determines whether the specified object is equal to the current object.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with the current object.

Returns:

bool

True if the specified object is equal to the current object; otherwise, false.

Overrides: object.Equals(object)

Convert a FontFamily to a ThemableFontFamily.

C#
public static ThemableFontFamily FromFontFamily(FontFamily value)
Parameters:valueFontFamily

The FontFamily.

Returns:

ThemableFontFamily

The ThemableFontFamily.

Resolve the effective font family using the provided theme.

C#
public FontFamily GetActualValue(DocumentTheme theme)
Parameters:themeDocumentTheme

The theme.

Returns:

FontFamily

The actual value.

Implements: IThemableObject<FontFamily>.GetActualValue(DocumentTheme)

Serves as a hash function for a particular type.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current object.

Overrides: object.GetHashCode()

Returns a string that represents the current object.

C#
public override string ToString()
Returns:

string

A string that represents the current object.

Overrides: object.ToString()

Operators

Explicitly cast a concrete font family to a themable font family.

C#
public static explicit operator ThemableFontFamily(FontFamily value)
Parameters:valueFontFamily

The font family.

Returns:

ThemableFontFamily

Themable font family.

Compares two themable font families.

C#
public static bool operator !=(ThemableFontFamily first, ThemableFontFamily second)
Parameters:firstThemableFontFamily

The first themable font family.

secondThemableFontFamily

The second themable font family.

Returns:

bool

If the two themable font families are not equal.

Compares two themable font families.

C#
public static bool operator ==(ThemableFontFamily first, ThemableFontFamily second)
Parameters:firstThemableFontFamily

The first themable font family.

secondThemableFontFamily

The second themable font family.

Returns:

bool

If the two themable font families are equal.

Properties

Gets whether the font family is sourced from the theme rather than locally specified.

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

The value indicating if the instance is from a theme.

Implements: IThemableObject<FontFamily>.IsFromTheme

LocalValue

FontFamily

Gets the locally assigned font family when not resolved from the theme.

C#
public FontFamily LocalValue { get; }
Property Value:

The local value.

Implements: IThemableObject<FontFamily>.LocalValue

Gets the theme font role (major/minor) when the value originates from the theme.

C#
public ThemeFontType ThemeFontType { get; }
Property Value:

The theme font type.