Export (0) Print
Expand All

TextBlock.FontStretch Property

Gets or sets the font stretch for the text content in this element.

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

public FontStretch FontStretch { get; set; }
<TextBlock FontStretch="fontStretchesValue"/>

XAML Values

fontStretchesValue

A FontStretches property name, such as Condensed, Normal, or Expanded. See Remarks regarding font fallback issues.

Property Value

Type: System.Windows.FontStretch
The 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.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft