Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何消除DataGrid行的3d效果_C#_Wpf_Datagrid - Fatal编程技术网

C# 如何消除DataGrid行的3d效果

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行具有某种3d视觉效果。它们看起来像被移到了左上角

如何消除该效果并使行看起来平坦而不移动

我尝试过改变CellStyle和RowStyle的边界厚度,但并没有解决这个问题

<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效果,但右边缘的小填充仍然保留。你知道如何移除它吗?