删除所有DataGrid行和单元格边框 [英] Removing all DataGrid row and cell borders

查看:197
本文介绍了删除所有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: p>

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆