Class
ThemableFontFamily

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:

cs-api-definition
public class ThemableFontFamily : IThemableObject<FontFamily>

Inheritance: objectThemableFontFamily

Implements: IThemableObject<FontFamily>

Constructors

ThemableFontFamily(FontFamily)

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

Declaration

cs-api-definition
public ThemableFontFamily(FontFamily fontFamily)

Parameters

fontFamily

FontFamily

The font family.

ThemableFontFamily(ThemeFontType)

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

Declaration

cs-api-definition
public ThemableFontFamily(ThemeFontType themeFontType)

Parameters

themeFontType

ThemeFontType

Type of the theme font.

ThemableFontFamily(string)

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

Declaration

cs-api-definition
public ThemableFontFamily(string familyName)

Parameters

familyName

string

Name of the family.

Properties

IsFromTheme

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

Declaration

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

Property Value

bool

The value indicating if the instance is from a theme.

Implements IThemableObject<FontFamily>.IsFromTheme

LocalValue

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

Declaration

cs-api-definition
public FontFamily LocalValue { get; }

Property Value

FontFamily

The local value.

Implements IThemableObject<FontFamily>.LocalValue

ThemeFontType

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

Declaration

cs-api-definition
public ThemeFontType ThemeFontType { get; }

Property Value

ThemeFontType

The theme font type.

Methods

Equals(object)

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

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

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)

FromFontFamily(FontFamily)

Declaration

cs-api-definition
public static ThemableFontFamily FromFontFamily(FontFamily value)

Parameters

value

FontFamily

The FontFamily.

Returns

ThemableFontFamily

The ThemableFontFamily.

GetActualValue(DocumentTheme)

Resolve the effective font family using the provided theme.

Declaration

cs-api-definition
public FontFamily GetActualValue(DocumentTheme theme)

Parameters

theme

DocumentTheme

The theme.

Returns

FontFamily

The actual value.

Implements IThemableObject<FontFamily>.GetActualValue(DocumentTheme)

GetHashCode()

Serves as a hash function for a particular type.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for the current object.

Overrides object.GetHashCode()

ToString()

Returns a string that represents the current object.

Declaration

cs-api-definition
public override string ToString()

Returns

string

A string that represents the current object.

Overrides object.ToString()

Operators

explicit operator ThemableFontFamily(FontFamily)

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

Declaration

cs-api-definition
public static explicit operator ThemableFontFamily(FontFamily value)

Parameters

value

FontFamily

The font family.

Returns

ThemableFontFamily

Themable font family.

operator !=(ThemableFontFamily, ThemableFontFamily)

Compares two themable font families.

Declaration

cs-api-definition
public static bool operator !=(ThemableFontFamily first, ThemableFontFamily second)

Parameters

first

ThemableFontFamily

The first themable font family.

second

ThemableFontFamily

The second themable font family.

Returns

bool

If the two themable font families are not equal.

operator ==(ThemableFontFamily, ThemableFontFamily)

Compares two themable font families.

Declaration

cs-api-definition
public static bool operator ==(ThemableFontFamily first, ThemableFontFamily second)

Parameters

first

ThemableFontFamily

The first themable font family.

second

ThemableFontFamily

The second themable font family.

Returns

bool

If the two themable font families are equal.