Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF DataGrid Vertical Line Thickness

I've added a DataGrid to my WPF Window, and I've set the VerticalGridLinesBrush property in the XAML to show the vertical grid lines in the relevant colour. But I can't figure out how to increase width of the vertical grid lines, that are displayed in the DataGridRow.

Can someone please show me how to set the vertical grid line thickness in a WPF DataGrid?

like image 628
m_collard Avatar asked Sep 07 '25 02:09

m_collard


2 Answers

set this properties

GridLinesVisibility="All" , VerticalGridLinesBrush="Red" and BorderThickness="1,1,5,0"

in dataGrid.

like image 123
raghava arr Avatar answered Sep 09 '25 02:09

raghava arr


It seems there is no thickness setting for the GridLines... you can probably use DataGridCell properties instead.

    <DataGrid GridLinesVisibility="Horizontal">
        <DataGrid.CellStyle>
            <Style TargetType="DataGridCell">
                <Setter Property="BorderThickness" Value="0,0,3,0"/>
                <Setter Property="BorderBrush" Value="Red"/>
            </Style>
        </DataGrid.CellStyle>
like image 31
grek40 Avatar answered Sep 09 '25 00:09

grek40