C# 如何消除DataGrid行的3d效果
默认情况下,DataGrid行具有某种3d视觉效果。它们看起来像被移到了左上角 如何消除该效果并使行看起来平坦而不移动 我尝试过改变CellStyle和RowStyle的边界厚度,但并没有解决这个问题C# 如何消除DataGrid行的3d效果,c#,wpf,datagrid,C#,Wpf,Datagrid,默认情况下,DataGrid行具有某种3d视觉效果。它们看起来像被移到了左上角 如何消除该效果并使行看起来平坦而不移动 我尝试过改变CellStyle和RowStyle的边界厚度,但并没有解决这个问题 <DataGrid.CellStyle> <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> <Setter Property=
<DataGrid.CellStyle>
<Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter Property="Background" Value="#FFF0F0F0"/>
<Setter Property="TextBlock.TextAlignment" Value="Right"/>
<Setter Property="BorderThickness" Value="0"/>
</Style>
</DataGrid.CellStyle>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}">
<Setter Property="BorderThickness" Value="0"/>
</Style>
</DataGrid.RowStyle>
在您的DataGrid上尝试DataGrid.GridLinesVisibility=“None”。它会删除3d效果,但右侧边缘的小填充仍然保留。知道如何删除它吗?在DataGrid上尝试DataGrid.GridLinesVisibility=“None”。它会删除3d效果,但右边缘的小填充仍然保留。你知道如何移除它吗?