删除所有DataGrid行和单元格边框 [英] Removing all DataGrid row and cell borders
本文介绍了删除所有DataGrid行和单元格边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想隐藏(或删除)中的所有行的所有边界(以及随后的细胞)在我的DataGrid,认为一个基本的 HTML表格。我已经找遍了,大部分的问题似乎是对他们的样式,而不是隐藏它们。
I want to hide (or remove) all the borders of all the rows (and subsequently cells) in my datagrid, think a basic HTML table. I've looked all over and most questions seem to be about styling them and not hiding them.
我已经尝试设置BorderBrush和了borderThickness,像这样:
I've already tried setting the BorderBrush and BorderThickness like so:
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
</Style>
</DataGrid.RowStyle>
试过同为CellStyle,但没有骰子,仍然看到边境。
Tried the same for the CellStyle, but no dice, still seeing borders.
推荐答案
怎么样设置 GridLinesVisibility =无
?
<DataGrid GridLinesVisibility="None">
...
<DataGrid>
这篇关于删除所有DataGrid行和单元格边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文