語言

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。

相依財產資訊

Item 價值觀
識別碼欄位 FontStyleProperty
元資料屬性設為 true AffectsMeasure、AffectsRender、Inherits

適用於

另請參閱