我已经在我的 WPF 窗口中添加了一个 DataGrid,并在 XAML 中设置了 VerticalGridLinesBrush 属性以显示相关颜色的垂直网格线。但是,我无法弄清楚如何增加在 DataGridRow 中显示的垂直网格线的宽度。
有人能告诉我如何在 WPF DataGrid 中设置垂直网格线的宽度吗?
有人能告诉我如何在 WPF DataGrid 中设置垂直网格线的宽度吗?
设置以下属性:
GridLinesVisibility="All",VerticalGridLinesBrush="Red" 和 BorderThickness="1,1,5,0"
在数据表格中。
似乎没有网格线的厚度设置...你可以使用 DataGridCell
属性代替。
<DataGrid GridLinesVisibility="Horizontal">
<DataGrid.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="BorderThickness" Value="0,0,3,0"/>
<Setter Property="BorderBrush" Value="Red"/>
</Style>
</DataGrid.CellStyle>