TextBlock.FontStretch Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets the font stretch for the text content in this element.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
<TextBlock FontStretch="fontStretchesValue"/>
XAML Values
Property Value
Type: System.Windows.FontStretchThe requested font stretch, which is a FontStretch that is obtained from one of the FontStretches property values. The default is Normal.
Dependency property identifier field: FontStretchProperty
A font stretch describes the degree to which a font form is stretched from its normal aspect ratio. (The aspect ratio is the original width to height ratio specified for the glyphs in the font.) This property can select only from fonts that exist in a font family and the corresponding glyphs. Setting a FontStretch value that does not inherently exist in a font family does not cause programmatic stretching of glyphs. Font fallback behavior does not change the property value, the property will remain as the value you set it to despite whatever visual behavior results due to font fallback.
The FontStretches properties correspond to the usWidthClass definition in the OpenType specification. The usWidthClass represents an integer value between 1 and 9. Lower numeric values indicate narrower widths, and higher values indicate wider widths. For more information about usWidthClass, see the enumeration table in FontStretches.
FontStretch settings for Run child elements override the settings on the containing TextBlock.