I have following grid. I have to hide column border of the grid and change the color of the row border. How to do that in WPF?
Also I have to make padding between the cells contents.
网格线非常简单:使用 DataGrid 的 HorizontalGridLinesBrush 和 VerticalGridLinesBrush 属性。对于红色水平线和透明垂直线:
<DataGrid HorizontalGridLinesBrush="Red" VerticalGridLinesBrush="Transparent"/>
填充不是那么明显:检查https://stackoverflow.com/a/5247078/786055
你必须设置GridLinesVisibility="None"
<DataGrid GridLinesVisibility="None">
...
<DataGrid>