Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FontFamily Class

July 28, 2014

Represents a family of related fonts.

System.Object
  System.Windows.Media.FontFamily

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)

public class FontFamily

The FontFamily type exposes the following members.

  NameDescription
Public methodFontFamilyInitializes a new instance of the FontFamily class from the specified font family string.
Top

  NameDescription
Public propertySourceGets the font family name that is used to construct the FontFamily object.
Top

  NameDescription
Public methodEqualsGets a value that indicates whether the current font family object and the specified font family object are the same. (Overrides Object.Equals(Object).)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for FontFamily. (Overrides Object.GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string representation of this FontFamily. (Overrides Object.ToString().)
Top

A font family is a set of typefaces that share the same family name, such as "Times New Roman", but that differ in features. These font family feature differences typically include font style, such as italic, and font weight, such as bold. For a full list of supported fonts in Windows Phone, see Font and language configuration support for Windows Phone 8.

To ensure consistency, you typically specify the font family using a theme resource. By default, the font family for a new page in a Windows Phone application is set to the following:

FontFamily="{StaticResource PhoneFontFamilyNormal}"

For a list of the theme resource font families, see Theme resources for Windows Phone.

XAML Attribute Usage

<object FontFamily="fontFamilyName" />
-or-
<object FontFamily="{StaticResource phoneFontFamily}" />

XAML Values

fontFamilyName

A string that specifies the font family.

phoneFontFamily

A Windows Phone theme resource font family, such as PhoneFontFamilySemiBold.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Show:
© 2014 Microsoft