语言

AccessText.FontStyle 属性

定义

获取或设置要与元素一起使用的 AccessText 字体样式。

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

属性值

要使用的字体样式;例如,普通、斜体或倾斜。 默认值由 MessageFontStyle 指标确定。

示例

以下示例演示如何设置属性以更改控件中 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>

注解

有关详细信息和字体样式列表,请参阅 FontStyle。

Dependency 属性信息

项目 价值
标识符字段 FontStyleProperty
元数据属性设置为 true AffectsMeasure、AffectsRender、Inherits

适用于

另请参阅