Share via


AccessText.FontWeight 属性

定义

获取或设置要用于 AccessText 元素的字体粗细。

public:
 property System::Windows::FontWeight FontWeight { System::Windows::FontWeight get(); void set(System::Windows::FontWeight value); };
public System.Windows.FontWeight FontWeight { get; set; }
member this.FontWeight : System.Windows.FontWeight with get, set
Public Property FontWeight As FontWeight

属性值

要使用的字体粗细。 默认值由 MessageFontWeight 规格确定。

示例

以下示例演示如何设置属性以更改控件中 AccessText 文本的外观。

<TextBox Name="textBox2" Width="50" Height="30"/>
<Label Target="{Binding ElementName=textBox2}">
  <AccessText Background="Red" Foreground="DarkSlateBlue"    
              FontFamily="Arial Narrow" FontSize="16" FontStyle="Italic" 
              FontWeight="Bold">
    E_dit
  </AccessText>
</Label>

注解

依赖项属性信息

标识符字段 FontWeightProperty
元数据属性设置为 true AffectsMeasure, AffectsRender, Inherits

适用于

另请参阅