Share via


TextBlock.FontStyle 属性

定义

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

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

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

属性值

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

适用于