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.

FontWeights Class

Provides a set of static predefined FontWeight values.

System.Object
  System.Windows.FontWeights

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

public static class FontWeights

The FontWeights type exposes the following members.

  NameDescription
Public propertyStatic memberBlackSpecifies a "Black" font weight.
Public propertyStatic memberBoldSpecifies a "Bold" font weight.
Public propertyStatic memberDemiBoldSpecifies a "Demi-bold" font weight.
Public propertyStatic memberExtraBlackSpecifies an "Extra-black" font weight.
Public propertyStatic memberExtraBoldSpecifies an "Extra-bold" font weight.
Public propertyStatic memberExtraLightSpecifies an "Extra-light" font weight.
Public propertyStatic memberHeavySpecifies a "Heavy" 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 memberRegularSpecifies a "Regular" font weight.
Public propertyStatic memberSemiBoldSpecifies a "Semi-bold" font weight.
Public propertyStatic memberThinSpecifies a "Thin" font weight.
Public propertyStatic memberUltraBlackSpecifies an "Ultra-black" font weight.
Public propertyStatic memberUltraBoldSpecifies an "Ultra-bold" font weight.
Public propertyStatic memberUltraLightSpecifies an "Ultra-light" 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.

For more information about the OpenType usWeightClass value, see the "Font File Tables" section of the OpenType specification.

In the following code example, the FontWeight is set to "UltraBold".


<TextBlock FontWeight="UltraBold" FontFamily="Gil Sans MT">Hello, world</TextBlock>


.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

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

Community Additions

Show:
© 2014 Microsoft