FontWeights Class

July 28, 2014

Provides a set of predefined font weights as static property values.

System.Object
  System.Windows.FontWeights

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

public static class FontWeights
See Remarks.

The FontWeights type exposes the following members.

  NameDescription
Public propertyStatic memberBlackSpecifies a "Black" font weight.
Public propertyStatic memberBoldSpecifies a "Bold" font weight.
Public propertyStatic memberExtraBlackSpecifies an "ExtraBlack" font weight.
Public propertyStatic memberExtraBoldSpecifies an "ExtraBold" font weight.
Public propertyStatic memberExtraLightSpecifies an "ExtraLight" font weight.
Public propertyStatic memberLightSpecifies a "Light" font weight.
Public propertyStatic memberMediumSpecifies a "Medium" font weight.
Public propertyStatic memberNormalSpecifies a "Normal" font weight.
Public propertyStatic memberSemiBoldSpecifies a "SemiBold" font weight.
Public propertyStatic memberThinSpecifies a "Thin" font weight.
Top

A font weight describes the relative weight of a font, in terms of the lightness or heaviness of the strokes. Weight differences are generally differentiated by an increased stroke or thickness that is associated with a given character in a font, as compared to a "normal" character from that same font.

The FontWeights values correspond to the usWeightClass definition in the OpenType Specification. The usWeightClass represents an integer value between 1 and 999. Lower values indicate lighter weights; higher values indicate heavier weights.

FontWeights Static Property Names

Font weight

usWeightClass

Thin

100

ExtraLight

200

Light

300

Normal

400

Medium

500

SemiBold

600

Bold

700

ExtraBold

800

Black

900

ExtraBlack

950

For more information on XAML usage, see FontWeight. FontWeight is the value type for Windows Phone properties or attributes that specify a font weight value, but you must use static properties of FontWeights to provide a FontWeight value. In XAML, you specify the name of a FontWeights property as the attribute value. This functionality is enabled by native XAML parsing behavior that processes the string value.

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