如何删除 listview wpf 列之间的空白 space?

How to remove blank space between column of listview wpf?

I want to remove blank between Symbol column and Price column Horizo​​ntalAlignment 不起作用

我的代码:

<GridViewColumn Width="80" Header="Symbol">
    <GridViewColumn.CellTemplate >
        <DataTemplate>
            <Grid Width="200" Background="Blue" Margin="0,0,0,0" Height="25" HorizontalAlignment="Stretch">
                <TextBlock Text="{Binding Symbol}" Width="auto" />
            </Grid>
        </DataTemplate>
    </GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="Price" Width="90">
    <GridViewColumn.CellTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding LastClose, StringFormat={}{0:N2}}" />
        </DataTemplate>
    </GridViewColumn.CellTemplate>
</GridViewColumn>

它并不理想,但您是否尝试过设置负右边距,例如“0,0,-10,0”或尝试调整网格上的填充 属性。

附带说明一下,我不确定您是否在 TextBlock 中添加了 Width="auto"。