語言

ContentPresenter.Background 屬性

定義

取得或設定筆 刷 套用到由 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>

屬性值

畫筆作為內容物的背景畫筆。 從純程式碼角度來看,預設是空刷,但系統風格預設會將此設定為白色(淺色主題)或黑色(暗色主題)。

適用於