Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to show gridline in the column header after applying background

After applying background to column header, the grid line cannot be seen anymore. Any simple way to get the gridline back?

like image 979
user496949 Avatar asked Dec 20 '10 07:12

user496949


1 Answers

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>
like image 107
Fredrik Hedblad Avatar answered Sep 28 '22 13:09

Fredrik Hedblad