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

屬性值

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 AffectsMeasureAffectsRenderInherits

適用於

另請參閱