如何使用XAML删除数据网格侧面的白色内容

时间:2022-11-20 07:45:24

So I just started getting into XAML and WPF with C# and im now using a datagrid and I have this weird white thing that I could use to resize the rows, I made it to where the user cant do it anymore but the white thing is still there. How do I get rid of it?

所以我刚开始使用C#进入XAML和WPF,我现在正在使用数据网格,我有这个奇怪的白色东西,我可以用它来调整行的大小,我把它带到了用户不能再做的地方,但白色的东西仍然是那里。我怎么摆脱它?

<DataGrid Name="datagridXAML" CanUserResizeRows="False" Foreground="White" RowBackground="Transparent" Background="Transparent" BorderBrush="Black" HorizontalAlignment="Left" Height="239" Margin="10,43,0,0" VerticalAlignment="Top" Width="505">

This is what it looks like

这就是它的样子

1 个解决方案

#1


0  

"white thing" is actually row headers. you can either set HeadersVisibility="Column" or RowHeaderWidth="0" to hide them

“白色的东西”实际上是行标题。您可以设置HeadersVisibility =“Column”或RowHeaderWidth =“0”来隐藏它们

#1


0  

"white thing" is actually row headers. you can either set HeadersVisibility="Column" or RowHeaderWidth="0" to hide them

“白色的东西”实际上是行标题。您可以设置HeadersVisibility =“Column”或RowHeaderWidth =“0”来隐藏它们