Uredi

Deli z drugimi prek


FormattedText.SetFontStretch Method

Definition

Sets the font stretch value for the FormattedText object.

Overloads

SetFontStretch(FontStretch)

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

SetFontStretch(FontStretch, Int32, Int32)

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

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

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.

Applies to

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

The desired FontStretch value to use for text formatting.

startIndex
Int32

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

count
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