ContentPresenter.Background 屬性

定義

取得或設定 Brush ,以套用至 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>

屬性值

做為內容背景筆刷的筆刷。 預設值是純程式碼檢視方塊中的 Null 筆刷,但系統樣式預設會針對色主題設定為白色 () 或深色主題的黑色 () 。

適用於