I want to change colour of the column already existing in my studentlist Observable collection but with this a new column gets created.
so How can I change color of the column already there in my studentList collection binded to datagrid instead of creating a new column?
<DataGrid AutoGenerateColumns="true" Height="200"
HorizontalAlignment="Left"
Margin="290,32,0,0"
Name="dataGrid2" VerticalAlignment="Top"
Width="201"
ItemsSource="{Binding Path=StudentList}"
DataContext="{Binding}" >
<DataGrid.Columns>
<DataGridTextColumn Header="StudentName"
Binding="{Binding Path=StudentName}">
<DataGridTextColumn.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="Foreground" Value="Blue">
</Setter>
</Style>
</DataGridTextColumn.CellStyle>
</DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>