AccessText.Foreground プロパティ

定義

要素のテキスト コンテンツを描画する Brush を取得または設定します。

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

プロパティ値

テキストを描画する Brush。 既定値は、Black です。

次の例は、コントロール内のテキストの外観を変更するプロパティを設定する方法を 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>

注釈

依存プロパティ情報

識別子フィールド ForegroundProperty
に設定されたメタデータ プロパティ true AffectsRender, SubPropertiesDoNotAffectRender, Inherits

適用対象

こちらもご覧ください