ContentPresenter.Background 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置要应用于 ContentPresenter 处理的内容背景的 Brush。
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 画笔,但系统样式默认设置为 白色 (对于 浅 色主题)或 黑色 (对于 深色 主题)。