I can't figure out why the first part of code isn't working, but the second is.
PART 1
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Style.Triggers>
<Trigger Property="IsMouseOver"
Value="True">
<Setter Property="Background"
Value="Green" />
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
PART 2
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Style.Triggers>
<Trigger Property="IsMouseOver"
Value="True">
<Setter Property="Background"
Value="Pink" />
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.CellStyle>
Basically, all I want to do is set the MouseOver color on a row...
Dude, I copy-pasted what you have it works perfectly fine for me. I'm not sure what issue you're having. Is there anything else in your XAML that could be relevant? Also, can you try adding a <Setter Property="Background" Value="Transparent"/>
to your DataGridRow's style and see if it fixes it?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With