我在列中有一个flexLayout方向。在FlexLayout中,我放置了6个stackLayout,每个布局将在其中放置一个图像。我需要将6张图片放置在stacklayout中。它会在堆栈布局的开头而不是居中显示布局堆栈。
<FlexLayout Direction="Column" VerticalOptions="Fill" HorizontalOptions="Fill">
<StackLayout FlexLayout.Grow="1" BackgroundColor="#EBF6FD">
<StackLayout.GestureRecognizers>
<TapGestureRecognizer Command="{Binding TimeSheetCommand, Source={x:Reference page}}"></TapGestureRecognizer>
</StackLayout.GestureRecognizers>
<ImageButton VerticalOptions="Center" HorizontalOptions="Center" BackgroundColor="Transparent" Source="timesheet.png" Command="{Binding TimeSheetCommand, Source={x:Reference page}}">
</ImageButton>
<Label VerticalOptions="Center" HorizontalOptions="Center" Text="{x:Static resources:Resources.TitleTimeSheet}" Style="{StaticResource primaryNormalTextStyle}" TextColor="#7CB4DD"></Label>
</StackLayout>
<StackLayout FlexLayout.Grow="1" BackgroundColor="#EBF6FD">
<StackLayout.GestureRecognizers>
<TapGestureRecognizer Command="{Binding TimeSheetCommand, Source={x:Reference page}}"></TapGestureRecognizer>
</StackLayout.GestureRecognizers>
<ImageButton VerticalOptions="Center" HorizontalOptions="Center" BackgroundColor="Transparent" Source="timesheet.png" Command="{Binding TimeSheetCommand, Source={x:Reference page}}">
</ImageButton>
<Label VerticalOptions="Center" HorizontalOptions="Center" Text="{x:Static resources:Resources.TitleTimeSheet}" Style="{StaticResource primaryNormalTextStyle}" TextColor="#7CB4DD"></Label>
</StackLayout>
我如何使项目位于堆栈布局内部