【发布时间】:2021-08-24 07:18:55
【问题描述】:
【问题讨论】:
-
能否提供你写的xaml
-
@rauf 如果下面的答案解决了您的问题,请接受它,以便您的帖子可以更好地帮助其他有类似问题的开发人员:stackoverflow.com/help/someone-answers
标签: c# .net xaml xamarin xamarin.forms
【问题讨论】:
标签: c# .net xaml xamarin xamarin.forms
要控制Grid 中Columns 之间的空间,请使用ColumnSpacing 属性。
docs 声明该属性控制
此网格布局中的列之间的空间。默认值为 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>
这会创建三个Columns Row,Column 元素之间没有空格:
【讨论】: