FormattedText.SetFontStretch 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
设置对象的 FormattedText 字体拉伸值。
重载
| 名称 | 说明 |
|---|---|
| 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) 该方法。