Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

FontWeights Class

Provides a set of static predefined FontWeight values.

Namespace:  System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)
public static class FontWeights
You cannot directly create an instance of this class in XAML.

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>
System.Object
  System.Windows.FontWeights
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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

.NET Framework

Supported in: 3.5, 3.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.