我正在尝试更改网格标题的前景颜色。我尝试过这样做,但它只更改列中的元素,而不更改标题。
<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>发布于 2013-06-20 16:50:22
修改DataGridColumnHeader的前台
它应该是可行的
https://stackoverflow.com/questions/17204176
复制相似问题