最佳答案
修复
要控制Grid
中Column
之间的空间,请使用ColumnSpacing
属性。
docs说明该属性控制
The space between columns in this Grid layout. The default is 6.
示例
以下代码为例
<Grid ColumnSpacing="0">
<ImageButton Grid.Column="0" Grid.Row="0" BackgroundColor="Red"/>
<ImageButton Grid.Column="1" Grid.Row="0" BackgroundColor="Blue"/>
<ImageButton Grid.Column="2" Grid.Row="0" BackgroundColor="Green"/>
</Grid>
这将创建一个三个Column
的Row
,并且Column
元素之间没有空格:
关于c# - 删除网格中 ImageButton 元素之间的空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67867672/