Share via


RichTextBlock.FontStyle 属性

定义

获取或设置此元素中内容的字体样式。

public:
 property FontStyle FontStyle { FontStyle get(); void set(FontStyle value); };
FontStyle FontStyle();

void FontStyle(FontStyle value);
public FontStyle FontStyle { get; set; }
var fontStyle = richTextBlock.fontStyle;
richTextBlock.fontStyle = fontStyle;
Public Property FontStyle As FontStyle
<RichTextBlock FontStyle="fontStyleMemberName"/>

属性值

请求的字体样式,即名为 constant 的 FontStyle 枚举。 默认值为 Normal。

注解

设置 FontStyle 属性以指定要用于 RichTextBlock 中所有文本的默认字体拉伸。 可以通过设置 TextElement.FontStyle 属性来替代 RichTextBlock 中特定文本元素的此值。

适用于

另请参阅