FontFamily class

Applies to Windows and Windows Phone

Represents a family of related fonts.

Inheritance

Object
  FontFamily

Syntax


public ref class FontFamily 


<FontFamily>fontFamilyName[,fallbackFontFamilyName]*</FontFamily>


<object FontFamily="fontFamilyName[,fallbackFontFamilyName]*" ... />
-or-
<object FontFamily="[uri]fontFamilyName[,[uri]fallbackFontFamilyName]*" ... />
-or-
<object FontFamily="embeddedUri#fontFamilyName[,[uri]fallbackFontFamilyName]*" ... />

XAML Values

fontFamilyName

A string that names the primary font.

fallbackFontFamilyName

Following the fontFamilyName and a comma, a string that names an optional fallback font. More than one fallback can be specified, each fallback separated by more commas.

uri

A URI that is evaluated as a relative path in the assembly.

embeddedUri

A URI in assembly that references an embedded font package such as a TTF file. This is followed by the hash symbol ("#"), then the family name of a font that is expected to exist in the package. You can specify fallbacks, but this is not typical (if you control the package, you know what font families it should contain.)

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

Members

The FontFamily class has these types of members:

Constructors

The FontFamily class has these constructors.

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

 

Methods

The FontFamily class inherits methods from the Object class.

Properties

The FontFamily class has these properties.

PropertyAccess typeDescription

Source

Read-onlyGets the font family name that is used to construct the FontFamily object.

 

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Media
Windows::UI::Xaml::Media [C++]

Metadata

Windows.winmd

See also

Control.FontFamily
RichTextBlock.FontFamily
TextBlock.FontFamily

 

 

Show:
© 2014 Microsoft