ClassThemableFontFamily
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:
public class ThemableFontFamily : IThemableObject<FontFamily>
Inheritance: objectThemableFontFamily
Implements:
Constructors
ThemableFontFamily(FontFamily)
Initializes a new instance of the ThemableFontFamily class with a concrete font family.
Declaration
public ThemableFontFamily(FontFamily fontFamily)
Parameters
fontFamily
The font family.
ThemableFontFamily(ThemeFontType)
Initializes a new instance that references a theme font role (major/minor).
Declaration
public ThemableFontFamily(ThemeFontType themeFontType)
Parameters
themeFontType
Type of the theme font.
ThemableFontFamily(string)
Initializes a new instance of the ThemableFontFamily class from a family name.
Declaration
public ThemableFontFamily(string familyName)
Parameters
familyName
Name of the family.
Properties
IsFromTheme
Gets whether the font family is sourced from the theme rather than locally specified.
Declaration
public bool IsFromTheme { get; }
Property Value
The value indicating if the instance is from a theme.
Implements
LocalValue
Gets the locally assigned font family when not resolved from the theme.
Declaration
public FontFamily LocalValue { get; }
Property Value
The local value.
Implements
ThemeFontType
Gets the theme font role (major/minor) when the value originates from the theme.
Declaration
public ThemeFontType ThemeFontType { get; }
Property Value
The theme font type.
Methods
FromFontFamily(FontFamily)
Convert a FontFamily to a ThemableFontFamily.
Declaration
public static ThemableFontFamily FromFontFamily(FontFamily value)
Parameters
value
The FontFamily.
Returns
The ThemableFontFamily.
GetActualValue(DocumentTheme)
Resolve the effective font family using the provided theme.
Declaration
public FontFamily GetActualValue(DocumentTheme theme)
Parameters
theme
The theme.
Returns
The actual value.
Implements
GetHashCode()
Serves as a hash function for a particular type.
Operators
explicit operator ThemableFontFamily(FontFamily)
Explicitly cast a concrete font family to a themable font family.
Declaration
public static explicit operator ThemableFontFamily(FontFamily value)
Parameters
value
The font family.
Returns
Themable font family.
operator !=(ThemableFontFamily, ThemableFontFamily)
Compares two themable font families.
Declaration
public static bool operator !=(ThemableFontFamily first, ThemableFontFamily second)
Parameters
first
The first themable font family.
second
The second themable font family.
Returns
If the two themable font families are not equal.
operator ==(ThemableFontFamily, ThemableFontFamily)
Compares two themable font families.
Declaration
public static bool operator ==(ThemableFontFamily first, ThemableFontFamily second)
Parameters
first
The first themable font family.
second
The second themable font family.
Returns
If the two themable font families are equal.