Fre*_*lad 26
试试这个
<Style x:Key="DataGridCellStyle" TargetType="{x:Type DataGridCell}" >
    <Style.Triggers>
        <Trigger Property="IsSelected" Value="True">
            <Setter Property="Foreground" Value="Green"/>
        </Trigger>
    </Style.Triggers>
</Style>
然后你可以在你认为合适的列中使用它
<DataGrid ...>
    <DataGrid.Columns>
        <DataGridTextColumn CellStyle="{StaticResource DataGridCellStyle}" .../>
如果要将其应用于所有列,可以将样式的x:键更改为
<Style x:Key="{x:Type DataGridCell}" TargetType="{x:Type DataGridCell}" >
| 归档时间: | 
 | 
| 查看次数: | 16497 次 | 
| 最近记录: |