ContentPresenter.Foreground Properti

Definisi

Mendapatkan atau mengatur Brush untuk diterapkan ke konten teks yang ditangani oleh 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>

Nilai Properti

Kuas yang digunakan sebagai kuas latar depan untuk isi teks. Defaultnya adalah kuas null dari perspektif kode murni, tetapi gaya sistem default mengatur ini ke Hitam (untuk tema Terang ) atau Putih (untuk Tema gelap ).

Berlaku untuk

Lihat juga