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

相依性屬性資訊

識別碼欄位 FontStyleProperty
中繼資料屬性設定為 true AffectsMeasure, AffectsRender, Inherits

適用於

另請參閱