FontFamily FontFamily FontFamily FontFamily Class


Represents a family of related fonts.

public : class FontFamily : IFontFamily
struct winrt::Windows::UI::Xaml::Media::FontFamily : IFontFamily
public class FontFamily : IFontFamily
Public Class FontFamily Implements IFontFamily
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


FontFamily(String) 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)
FontFamily(winrt::hstring familyName) const;
public FontFamily(String familyName)
Public Sub New(familyName As String)
String String

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


Source Source Source Source

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

public : Platform::String Source { get; }
winrt::hstring Source();
public string Source { get; }
Public ReadOnly Property Source As string
string string

The font family name of the FontFamily object.

XamlAutoFontFamily XamlAutoFontFamily XamlAutoFontFamily XamlAutoFontFamily

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

public : static FontFamily XamlAutoFontFamily { get; }
static FontFamily XamlAutoFontFamily();
public static FontFamily XamlAutoFontFamily { get; }
Public Static ReadOnly Property XamlAutoFontFamily As FontFamily
FontFamily 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)


<TextBlock FontFamily="XamlAutoFontFamily"/>

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


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