ContentPresenter.Foreground Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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).