During the update of the GridView (ListView with a large number of columns), I encountered a problem that I could not change the color of the Highlighted row. I searched the Internet and found out that this could help.
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" /> <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" />
This solved the problem for some people, but it did not help me. The highlight color was still included in the system by default. Finally, I managed to change the color of the selected row, but the highlight is still visible around the border of the row, and I need to get rid of the selection in the columns.
Here is the code where my approach does not work:
<ListView > <ListView.Resources> <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" /> <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" /> </ListView.Resources> <ListView.View> <GridView> <GridViewColumn Header="a"/> <GridViewColumn Header="b"/> </GridView> </ListView.View> <ListViewItem>sth</ListViewItem> <ListViewItem>sthelse</ListViewItem> </ListView>
source share