Jaa


ContentPresenter.Foreground Property

Definition

Gets or sets the Brush to apply to the text content handled by the 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>

Property Value

The brush used as the foreground brush for the text contents. The default is a null brush from a pure code perspective, but system style defaults set this to Black (for Light theme) or White (for Dark theme).

Applies to

See also