您尝试过的应该确实有效。
看这个例子:
<Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource SampleDataSource}}">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="10*"/>
</Grid.RowDefinitions>
<Rectangle Fill="#FF0090FF"/>
<DataGrid Grid.Row="1" ItemsSource="{Binding TestCollection}" Background="Purple">
<DataGrid.Resources>
<Style TargetType="DataGridRow">
<Setter Property="Background" Value="Yellow"/>
</Style>
<Style TargetType="DataGridCell">
<Style.Triggers>
<Trigger Property="IsSelected" Value="true">
<Setter Property="Background" Value="#6F0090FF"/>
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.Resources>
</DataGrid>
</Grid>

有蓝色矩形。Fill
属性设置#FF0090FF
为. 您应该注意的是,您所称"UnSelected Background color"
的实际上Background
是DataGridRow
.
Fill
现在......所选单元格的背景颜色与该矩形(#0090FF
)的背景颜色完全相同。我只更改Alpha
为大约 50%( #6F0090FF
)。正如您所期望的那样,您看到的是绿色的东西。

更新
当你想保存Background
时,DataGridCell
你必须选择不同的方法。我建议在你的DataGridCell's ControlTemplate
这个层......我们可以称之为例如“selectedCellVisual”只有在选择单元格时才可见。
所以...我们必须创建因此我们必须从前面ControlTemplate
的示例中更改样式。DataGridCell
<Style TargetType="DataGridCell" >
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="Background" Value="Red"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
<Grid>
<Rectangle x:Name="selectedCellVisual" Fill="#6F0090FF" Visibility="Collapsed"/>
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="true">
<Setter TargetName="selectedCellVisual" Property="Visibility" Value="Visible"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
现在DataGridCell
有红色Background
,当它被选中时,半透明的蓝色矩形“selectedCellVisual”是可见的。背景上的透明蓝色和红色使最终的紫罗兰色。

你应该注意
<Setter Property="OverridesDefaultStyle" Value="True"/>
它必须在那里......因为我们没有更改IsSelected
更改单元格背景的属性的触发器。它以默认样式定义。它的变化Background
和Foreground
属性。您可以在第一个示例中注意到这一点。前景设置为白色,单元格周围有一像素宽的蓝线。