DataGridTextColumn.Foreground Property
Gets or sets the brush that is used to paint the text contents of cells in the column.
Namespace: System.Windows.Controls
Assembly: System.Windows.Controls.Data (in System.Windows.Controls.Data.dll)
<sdk:DataGridTextColumn> <sdk:DataGridTextColumn.Foreground> singleBrush </sdk:DataGridTextColumn.Foreground> </sdk:DataGridTextColumn>
<sdk:DataGridTextColumn Foreground="colorString"/>
XAML Values
Property Value
Type: System.Windows.Media.BrushThe brush that is used to paint the contents of cells in the column. The default is null.
| Exception | Condition |
|---|---|
| NullReferenceException |
The Foreground value has not been set. |
If you do not explicitly set the DataGridTextColumn.Foreground property, the first non-null Foreground property specified in the visual tree is used for display, but the DataGridTextColumn.Foreground property returns null.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.