ContentPresenter.Foreground プロパティ

定義

ContentPresenter によって処理されるテキスト コンテンツに適用するブラシを取得または設定します。

public:
 property Brush ^ Foreground { Brush ^ get(); void set(Brush ^ value); };
Brush Foreground();

void Foreground(Brush value);
public Brush Foreground { get; set; }
var brush = contentPresenter.foreground;
contentPresenter.foreground = brush;
Public Property Foreground As Brush
<ContentPresenter Foreground="{StaticResource resourceName}"/>
- or -
<ContentPresenter Foreground="colorString"/>
- or -
<ContentPresenter>
  <ContentPresenter.Foreground>singleBrush</ContentPresenter.Foreground>
</ContentPresenter>

プロパティ値

テキスト コンテンツの前景ブラシとして使用されるブラシ。 既定値は純粋なコードの観点からの null ブラシですが、システム スタイルの既定値では、これを ( ライト テーマの場合) または ( 濃色 テーマの場合) に設定します。

適用対象

こちらもご覧ください