Вы можете добавить триггер по указанной вами ссылке к определенному вами Style
:
<DataGridTextColumn.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="Background" Value="{StaticResource backColour}"/>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Foreground" Value="Black"/>
</Trigger>
</Style.Triggers>
</Style>
</DataGridTextColumn.CellStyle>
Но, учитывая, что Foreground
также является черным, когда строка не выбрана, вы можете просто сделать Foreground
всегда черным:
<DataGridTextColumn.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="Background" Value="{StaticResource backColour}"/>
<Setter Property="Foreground" Value="Black" />
</Style>
</DataGridTextColumn.CellStyle>