How to show gridline in column header after applying background

After applying the background to the column heading, the grid line is no longer visible. Any easy way to get the grid back?

+5
source share
1 answer

You can specify BorderBrush and BorderThickness for the DataGridColumnHeader. Example

<DataGrid.Resources>
    <Style TargetType="{x:Type DataGridColumnHeader}">
        <Setter Property="Background" Value="Blue"/>
        <Setter Property="BorderBrush" Value="Red"/>
        <Setter Property="BorderThickness" Value="1,1,1,1"/>
    </Style>
</DataGrid.Resources>
+9
source

All Articles