Share via


ContentPresenter.Background Properti

Definisi

Mendapatkan atau mengatur Brush untuk diterapkan ke latar belakang konten yang ditangani oleh ContentPresenter.

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

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

Nilai Properti

Kuas yang digunakan sebagai kuas latar belakang untuk isinya. Defaultnya adalah kuas null dari perspektif kode murni, tetapi gaya sistem default mengatur ini ke Putih (untuk tema Terang ) atau Hitam (untuk tema Gelap ).

Berlaku untuk