As an extention to @Seb Kade's answer, you can fully control the colours of the selected and unselected rows using the following Style
:
<Style TargetType="{x:Type DataGridRow}">
<Style.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" />
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlTextBrushKey}" Color="Black" />
</Style.Resources>
</Style>
You can of course enter whichever colours you prefer. This Style
will also work for other collection items such as ListBoxItem
s (if you replace TargetType="{x:Type DataGridRow}"
with TargetType="{x:Type ListBoxItem}"
for instance).