Reputation: 509
I am trying to change the Foreground color of my grid header. I tried this but it changes only the elements in the column but not the header.
<DataGrid Name="Datagrid" RowBackground="Black" FontFamily="Trebuchet MS" Grid.ColumnSpan="2" Foreground="WhiteSmoke"
<DataGrid.Columns >
<DataGridTextColumn Header="ID" Binding="{Binding Id}" Width="*" Foreground="WhiteSmoke" >
<DataGridTextColumn.ElementStyle>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Black"></Setter>
</Style>
</DataGridTextColumn.ElementStyle>
</DataGridTextColumn>
</DataGrid>
Upvotes: 0
Views: 231