FontFamily FontFamily FontFamily Class

Definition

Represents a family of related fonts.

public : class FontFamily : IFontFamily
public class FontFamily : IFontFamily
Public 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(Platform::String familyName)
public FontFamily(String familyName)
Public Sub New(familyName As String)
Parameters
familyName
Platform::String String String

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

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
Platform::String string string

The font family name of the FontFamily object.

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.

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

Examples

<TextBlock FontFamily="XamlAutoFontFamily"/>

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

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