DataGridColumnHeader.BorderThickness=0 对我有效,但 DataGridRow 或 DataGridCell 无效,有任何想法吗?
<DataGrid x:Name="dg">
<DataGrid.Resources>
<Style TargetType="DataGrid">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
</Style>
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Black" />
<Setter Property="BorderThickness" Value="0 0 0 1" />
</Style>
</DataGrid.Resources>
</DataGrid>
结果如下: