Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FormattedText.SetForegroundBrush Method (Brush)

Changes the foreground Brush for an entire FormattedText object.

Namespace:  System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)

public void SetForegroundBrush(
	Brush foregroundBrush
)

Parameters

foregroundBrush
Type: System.Windows.Media.Brush

The brush to use for the text foreground.

This method sets the foreground brush for the entire text string. To set the foreground brush for a subset of the text string, use the SetForegroundBrush(Brush, Int32, Int32) method.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft