語言

FormattedText.SetFontStretch 方法

定義

設定物件的字型拉伸值 FormattedText 。

多載

名稱 Description
SetFontStretch(FontStretch)

設定物件中整個字元 FormattedText 集合的字型拉伸值。

SetFontStretch(FontStretch, Int32, Int32)

設定物件中特定字元 FormattedText 子集的字型拉伸值。

SetFontStretch(FontStretch)

設定物件中整個字元 FormattedText 集合的字型拉伸值。

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)

參數

stretch
FontStretch

用於文字格式化的期望 FontStretch 值。

備註

字型拉伸值指的是字型在螢幕上被拉伸的程度。 FontStretch 支援型別轉換行為,使得類別的靜態值 FontStretches 可以用來初始化 FontStretch 和填充型別 FontStretch為 的參數。 你也可以呼叫 FromOpenTypeStretch 來建立一個正確初始化 FontStretch的 。

此方法設定整個文字字串的字型拉伸值。 要設定文字字串子集的字型拉伸值,請使用以下 SetFontStretch(FontStretch, Int32, Int32) 方法。

適用於

SetFontStretch(FontStretch, Int32, Int32)

設定物件中特定字元 FormattedText 子集的字型拉伸值。

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)

參數

stretch
FontStretch

用於文字格式化的期望 FontStretch 值。

startIndex
Int32

用來套用字型拉伸的初始字元起始索引。

count
Int32

字型拉伸要套用的字元數。

備註

字型拉伸值指的是字型在螢幕上被拉伸的程度。

FontStretch 支援型別轉換行為,使得類別的靜態值 FontStretches 可以用來初始化 FontStretch 和填充型別 FontStretch為 的參數。 你也可以呼叫 FromOpenTypeStretch 來建立一個正確初始化 FontStretch的 。

要設定整個文字串的字型拉伸值,請使用該 SetFontStretch(FontStretch) 方法。

適用於