I have a horizontal StackLayout that contains two FlexLayouts. The StackLayout is aligned at the top right of the screen. Now I would like the left FlexLayout (here called LeftStack, see code below) to be able to grow horizontally and once there are too many items for a single row; to wrap to a new line. I tried two things
Setting the Wrap property to Wrap but the left FlexLayout then wraps each item immediately instead of expanding the FlexLayout horizontally and I get a column of items :(
Setting Direction to RowReverse which results in all items of the left FlexLayout to vanish. Well, that is unexpected :(
How do you get the left FlexLayout to wrap once there are too may items for a single row? The first wrapped item should show up underneath the dark green BoxView. The screenshot shows what I would like to achieve (and not the result of the posted code). Any ideas how to make the left FlexLayout wrap?
<Grid VerticalOptions="Start">
<StackLayout
HorizontalOptions="End"
Margin="0,50,0,0"
Orientation="Horizontal"
BackgroundColor="White">
<FlexLayout x:Name="LeftStack"
Direction="Row"
Wrap="Wrap">
<BoxView BackgroundColor="DarkRed" WidthRequest="100" HeightRequest="60" FlexLayout.Grow="1"/>
<BoxView BackgroundColor="DarkGray" WidthRequest="100" HeightRequest="60" FlexLayout.Grow="1"/>
</FlexLayout>
<FlexLayout x:Name="RightStack"
Direction="Row">
<BoxView BackgroundColor="LightCoral" WidthRequest="60" HeightRequest="60" FlexLayout.Grow="1"/>
<BoxView BackgroundColor="LightGreen" WidthRequest="60" HeightRequest="60" FlexLayout.Grow="1"/>
</FlexLayout>
</StackLayout>
</Grid>