Share via


RichTextBlock.FontWeight 属性

定义

获取或设置 RichTextBlock 的顶级字体粗细。

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

void FontWeight(FontWeight value);
public FontWeight FontWeight { get; set; }
var fontWeight = richTextBlock.fontWeight;
richTextBlock.fontWeight = fontWeight;
Public Property FontWeight As FontWeight
<RichTextBlock FontWeight="fontWeightsMemberName"/>

属性值

请求的字体粗细,它是从 FontWeights 属性值之一获取的 FontWeight 。 默认值为 Normal

注解

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

适用于

另请参阅