FormattedText.SetFontStretch FormattedText.SetFontStretch FormattedText.SetFontStretch FormattedText.SetFontStretch Method

Definition

Sets the font stretch value for the FormattedText object.

Overloads

SetFontStretch(FontStretch) SetFontStretch(FontStretch) SetFontStretch(FontStretch) SetFontStretch(FontStretch)

Sets the font stretch value for the entire set of characters in the FormattedText object.

SetFontStretch(FontStretch, Int32, Int32) SetFontStretch(FontStretch, Int32, Int32) SetFontStretch(FontStretch, Int32, Int32) SetFontStretch(FontStretch, Int32, Int32)

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

SetFontStretch(FontStretch) SetFontStretch(FontStretch) SetFontStretch(FontStretch) SetFontStretch(FontStretch)

Sets the font stretch value for the entire set of characters in the FormattedText object.

public:
 void SetFontStretch(System::Windows::FontStretch stretch);
public void SetFontStretch (System.Windows.FontStretch stretch);
member this.SetFontStretch : System.Windows.FontStretch -> unit
Public Sub SetFontStretch (stretch As FontStretch)

Parameters

stretch
FontStretch FontStretch FontStretch FontStretch

The desired FontStretch value to use for text formatting.

Remarks

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.

This method sets the font stretch value for the entire text string. To set the font stretch value for a subset of the text string, use the SetFontStretch(FontStretch, Int32, Int32) method.

SetFontStretch(FontStretch, Int32, Int32) SetFontStretch(FontStretch, Int32, Int32) SetFontStretch(FontStretch, Int32, Int32) SetFontStretch(FontStretch, Int32, Int32)

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

public:
 void SetFontStretch(System::Windows::FontStretch stretch, int startIndex, int count);
public void SetFontStretch (System.Windows.FontStretch stretch, int startIndex, int count);
member this.SetFontStretch : System.Windows.FontStretch * int * int -> unit
Public Sub SetFontStretch (stretch As FontStretch, startIndex As Integer, count As Integer)

Parameters

stretch
FontStretch FontStretch FontStretch FontStretch

The desired FontStretch value to use for text formatting.

startIndex
Int32 Int32 Int32 Int32

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

count
Int32 Int32 Int32 Int32

The number of characters to apply the font stretch to.

Remarks

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.

Applies to