找到一位仁兄寫的資料,困擾我好幾天的問題最終得到解決。
根源:Cell的樣式把Row的樣式覆蓋了,所以觸發器應該設置在Cell樣式中
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="MinWidth" Value="85"/>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="LightBlue"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.CellStyle>
參考:http://doncle.blog.163.com/blog/static/162813941201431011025934/