on-internet
← Community

WPF DataGrid RowStyle for selected row not changing the background and foreground color

Stack Overflow ·

I am using Visual Studio 2012 on windows 7. I need to know why the following style for Grid's selected row does not work for background and foreground colors but works perfectly fine for other properties like BorderBrush and BorderThickness etc? Though I can see them changing while mouse over grid rows. <Style x:Key="gridRowStyle" TargetType="{x:Type DataGridRow}"> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Background" Value="PeachPuff"/> <Setter Property="Foreground" Value="BlueViolet"/> </Trigger> <Trigger Property="IsSelected" Value="True"> <Setter Prop

Comments

Sign in or sign up to comment and upvote.

No comments yet.