ContentPresenter.Background 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定筆 刷 套用到由 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>
屬性值
畫筆作為內容物的背景畫筆。 從純程式碼角度來看,預設是空刷,但系統風格預設會將此設定為白色(淺色主題)或黑色(暗色主題)。