SetFontStretch Method (FontStretch, Int32, Int32)

FormattedText.SetFontStretch Method (FontStretch, Int32, Int32)


Sets the font stretch value for a specified subset of characters in the FormattedText object.

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

public void SetFontStretch(
	FontStretch stretch,
	int startIndex,
	int count


Type: System.Windows.FontStretch

The desired FontStretch value to use for text formatting.

Type: System.Int32

The start index of the initial character to apply the font stretch to.

Type: System.Int32

The number of characters to apply the font stretch to.

The font stretch value refers to the degree to which a font is stretched on the screen.

FontStretch supports type conversion behavior such that static values of the FontStretches class can be used to initialize FontStretch and fill parameters that are type FontStretch. You can also call FromOpenTypeStretch to create a properly initialized FontStretch.

To set the font stretch value for the entire text string, use the SetFontStretch(FontStretch) method.

.NET Framework
Available since 3.0
Return to top
© 2016 Microsoft