Skip to content

Latest commit

 

History

History
46 lines (29 loc) · 1.23 KB

fontweights.md

File metadata and controls

46 lines (29 loc) · 1.23 KB
-api-id -api-type
T:Windows.UI.Text.FontWeights
winrt class

Windows.UI.Text.FontWeights

-description

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

-xaml-syntax

See XAML Syntax for FontWeight

-remarks

In standard typography API, the weight of a font is expressed by using constant names, for example "Bold". Using constant names for setting a font weight property is supported through type converter behaviors and also by the FontWeights support class. For code access, the relevant information is expressed as the Weight factor of a FontWeight value.

This image shows the various font weight values applied to text.

Various font weight values applied to text

-examples

This example shows how to set the FontWeight property on a XAML TextBlock.

<TextBlock Text="FontWeight ExtraBlack" FontWeight="ExtraBlack"/>
TextBlock textBlock1 = new TextBlock();
textBlock1.Text = "FontWeight ExtraBlack";
textBlock1.FontWeight = Windows.UI.Text.FontWeights.ExtraBlack;

-see-also