Gets or sets the Brush to apply to the content in this element.
Assembly: System.Windows (in System.Windows.dll)
<textElement> <textElement.Foreground> singleBrush </textElement.Foreground> </textElement>
Dependency property identifier field: ForegroundProperty
Some brush types (SolidColorBrush) support a XAML attribute syntax, whereas other brush types (ImageBrush, LinearGradientBrush, and RadialGradientBrush) support only an object element syntax. This is why two versions of XAML syntax are shown for this property.
When animating a , you must use indirect targeting. For instance, if you are animating the color of a SolidColorBrush that is the of a TextBlock, the syntax would be <ColorAnimation ... Storyboard.TargetProperty="(Run.Foreground).(SolidColorBrush.Color)" />.
XAML property element usage for a non-solid brush is uncommon, because it clashes with the inherent document object model intention for text elements. If you use a non-solid brush, you might instead make a resource reference to a ResourceDictionary defined brush.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.