0

How would I go about changing the datagrid hover colour in wpf?

I want the hover colour to go from this: https://i.stack.imgur.com/xPHB2.jpg

To my own custom colour.

GRPAT
  • 39
  • 2
  • 5

1 Answers1

1

You can define style for DataGridCell as following:

<Style TargetType="{x:Type DataGridCell}">
    <Style.Triggers>
        <Trigger Property="IsMouseOver" Value="True">
            <Setter Property="Background" Value="Red" />
        </Trigger>
    </Style.Triggers>
</Style>
Aakanksha
  • 329
  • 2
  • 7