ContentPresenter.Foreground Propiedad

Definición

Obtiene o establece el pincel que se va a aplicar al contenido de texto controlado por ContentPresenter.

public:
 property Brush ^ Foreground { Brush ^ get(); void set(Brush ^ value); };
Brush Foreground();

void Foreground(Brush value);
public Brush Foreground { get; set; }
var brush = contentPresenter.foreground;
contentPresenter.foreground = brush;
Public Property Foreground As Brush
<ContentPresenter Foreground="{StaticResource resourceName}"/>
- or -
<ContentPresenter Foreground="colorString"/>
- or -
<ContentPresenter>
  <ContentPresenter.Foreground>singleBrush</ContentPresenter.Foreground>
</ContentPresenter>

Valor de propiedad

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

Se aplica a

Consulte también