forms - 如何在 xamarin 表单的 Flex 布局中从头开始对齐项目?
问题描述
我正在使用 xamarin 表单 V3.3.0。我无法从一开始就对齐 flex 布局的最后一行中的项目。我尝试使用这些属性组合,Direction="Row" Wrap="Wrap" JustifyContent="Center" AlignContent="Start" AlignItems="Start"。在下面添加了代码和图像。
<FlexLayout Direction="Row" Wrap="Wrap" Margin="5" JustifyContent="Center" AlignContent="Start" AlignItems="Start">
<BoxView HeightRequest="100" WidthRequest="100" BackgroundColor="Blue" Margin="5"></BoxView>
<BoxView HeightRequest="100" WidthRequest="100" BackgroundColor="Blue" Margin="5"></BoxView>
<BoxView HeightRequest="100" WidthRequest="100" BackgroundColor="Blue" Margin="5"></BoxView>
<BoxView HeightRequest="100" WidthRequest="100" BackgroundColor="Blue" Margin="5"></BoxView>
<BoxView HeightRequest="100" WidthRequest="100" BackgroundColor="Blue" Margin="5"></BoxView>
<BoxView HeightRequest="100" WidthRequest="100" BackgroundColor="Blue" Margin="5"></BoxView>
<BoxView HeightRequest="100" WidthRequest="100" BackgroundColor="Blue" Margin="5"></BoxView>
<BoxView HeightRequest="100" WidthRequest="100" BackgroundColor="Blue" Margin="5"></BoxView>
<BoxView HeightRequest="100" WidthRequest="100" BackgroundColor="Blue" Margin="5"></BoxView>
<BoxView HeightRequest="100" WidthRequest="100" BackgroundColor="Blue" Margin="5"></BoxView>
<BoxView HeightRequest="100" WidthRequest="100" BackgroundColor="Blue" Margin="5"></BoxView>
<BoxView HeightRequest="100" WidthRequest="100" BackgroundColor="Blue" Margin="5"></BoxView>
<BoxView HeightRequest="100" WidthRequest="100" BackgroundColor="Blue" Margin="5"></BoxView>
<BoxView HeightRequest="100" WidthRequest="100" BackgroundColor="Blue" Margin="5"></BoxView>
</FlexLayout>
解决方案
推荐阅读
- python - Python:ValueError:无法将字符串转换为浮点数:'44,052,037.79'
- python - 如何正确使用 key=operator.itemgetter() 对数据进行正确排序?
- python - argparse:将无法识别的选项视为位置?
- actionscript-3 - 从 AIR 中启动 Inno Setup Update
- python - python中的p = {}和p:dict = {}有什么区别?
- c++ - 您如何根据用户输入在地图中添加某些值?
- javascript - 单击按钮时陷入无限循环
- c - 从数组中删除元素的重复 Vals
- javascript - 为什么我的返回语句在我的节点服务器文件中返回 null?
- sql - 显示所有 50 岁以上客户的名字、生日和年龄