ContentPresenter.Background Propiedad

Definición

Obtiene o establece el pincel que se va a aplicar al fondo del contenido controlado por 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>

Valor de propiedad

Pincel usado como pincel de fondo para el contenido. El valor predeterminado es un pincel nulo desde una perspectiva de código puro, pero el estilo del sistema establece este valor en Blanco (para tema claro ) o Negro (para tema oscuro ).

Se aplica a