【发布时间】:2021-07-11 02:22:17
【问题描述】:
I want to remove blank between Symbol column and Price column 水平对齐不起作用
我的代码:
<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>
【问题讨论】:
-
从你的红色圆圈中不清楚你想删除什么空白(从标题中,还是从数据单元格中?)。显示一个红色矩形可能会更好。