Hi,
I found that DataGridRow Foreground IsSelected and IsMouseOver is not working well. I'm looking a solution to set Foreground IsMouseOver overriding Foreground IsSelected when it's IsSelected for DataGridRow. However, i found out it's only working for DataGridCell by using Trigger.
I'm curious why it's working for Background when it's set to Transparent, but it's seems doesn't work for Foreground? Please advise.
Below is my code:-
<DataGrid.Resources><SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" /><SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Transparent" /></DataGrid.Resources><DataGrid.RowStyle><Style TargetType="DataGridRow"><Style.Triggers><Trigger Property="IsSelected" Value="True"><Setter Property="Background" Value="Orange" /><Setter Property="Foreground" Value="Green" /></Trigger><Trigger Property="IsMouseOver" Value="True"><Setter Property="Background" Value="Pink"/><Setter Property="Foreground" Value="Red" /></Trigger></Style.Triggers></Style></DataGrid.RowStyle>