Changing ListView Header and Grid Lines colors

c#, winforms

Solution

You can perform that in a DataGrid, but I don't think there's an easy way for ListView, since there are no properties for those lines, unlike DataGrid.

<Style TargetType="{x:Type DataGrid}">
    <Setter Property="HorizontalGridLinesBrush" Value="Red"/>
    <Setter Property="VerticalGridLinesBrush" Value="Green"/>
</Style>

Put it into application resources or window resources.

Other than that, there's a way to change the border color of each ListViewItem:

<Style TargetType="{x:Type ListViewItem}">
    <Setter Property="BorderBrush" Value="Red"/>
</Style>

Problem

Well i have a windows forms application in which i add a couple of listViews in order to hold some data for the user and it looks like this As you see my form backcolor is black so the list view's grid lines and header white color makes an annoying contrast so after an hour searching without a luck i decided to ask here. [Question] : How could i edit the colors of the Header & Grid Lines of the list view to match my needs ?

Original source

Related problems