Font​Family Font​Family Font​Family Class

Definition

Represents a family of related fonts.

public class FontFamily : IFontFamilypublic class FontFamily : IFontFamilyPublic Class FontFamily Implements IFontFamily
<FontFamily>fontFamilyName[,fallbackFontFamilyName]*</FontFamily>
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Constructors

FontFamily(String) FontFamily(String) FontFamily(String)

Initializes a new instance of the FontFamily class from the specified font family string.

public FontFamily(String familyName)public FontFamily(String familyName)Public Sub New(familyName As String)
Parameters
familyName
System.String System.String System.String

The family name of the font to represent. This can include a hashed suffix.

Attributes

Properties

Source Source Source

Gets the font family name that is used to construct the FontFamily object.

public PlatForm::String Source { get; }public string Source { get; }Public ReadOnly Property Source As string
Value
string string string

The font family name of the FontFamily object.

Attributes

XamlAutoFontFamily XamlAutoFontFamily XamlAutoFontFamily

Gets the default font family based on an app's language settings.

public static FontFamily XamlAutoFontFamily { get; }public static FontFamily XamlAutoFontFamily { get; }Public Static ReadOnly Property XamlAutoFontFamily As FontFamily
Value
FontFamily FontFamily FontFamily

The default font family based on an app's language settings. See Remarks.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)

Remarks

XamlAutoFontFamily is the default FontFamily property setting for all XAML controls. The FontFamily that this property gets at run time depends on the app language.

LanguageDefault FontFamily
JapaneseYu Gothic UI
KoreanMalgun Gothic
All othersSegoe UI

Examples

<TextBlock FontFamily="XamlAutoFontFamily"/>

TextBlock textBlock1 = new TextBlock();
textBlock1.FontFamily = FontFamily.XamlAutoFontFamily;