Xamarin.forms: [FlexLayout] Can't Nest a FlexLayout in a Nested FlexLayout

Created on 25 Apr 2018  路  6Comments  路  Source: xamarin/Xamarin.Forms

Description

A FlexLayout inside a FlexLayout works fine, but another nested FlexLayout disappears.

Steps to Reproduce

Here's some XAML attempting to reproduce a "holy grail" layout:

   <FlexLayout Direction="Column">
        <Label Text="Header" />

        <FlexLayout FlexLayout.Grow="1">

            <FlexLayout Direction="Column">
                <Label Text="Nav #1" />
                <Label Text="Nav #2" />
                <Label Text="Nav #3" />
            </FlexLayout>

            <Label Text="Content"
                   FlexLayout.Grow="1" />

            <Label Text="Aside" />
        </FlexLayout>

        <Label Text="Footer" />
    </FlexLayout>

Expected Behavior

The FlexLayout with the three Label children should be visible.

Actual Behavior

But it's not there are all.

Basic Information

  • Xamarin.Forms 3.0.0.354232-pre3
  • Visual Studio 2017 version 15.6.4
  • Platform Target Frameworks:

    • iOS: 11.3

    • Android: 8.1

    • UWP: 10.0.16299

Reproduction Link

Complete solution at https://github.com/xamarin/private-samples/tree/master/FlexLayoutIssue

flex layout 3 help wanted bug up-for-grabs

Most helpful comment

Just spend a while thinking I had a bug in my code because of this issue. Any update on when it will be addressed? Thanks.

All 6 comments

Just spend a while thinking I had a bug in my code because of this issue. Any update on when it will be addressed? Thanks.

Is this just a case of semantics with FlexLayout.Grow? If you set :

       <FlexLayout Direction="Column" FlexLayout.Grow="1">
            <Label Text="Nav #1" />
            <Label Text="Nav #2" />
            <Label Text="Nav #3" />
        </FlexLayout>

The labels appear.

Try force the HeighRequest value of the first FlexLayout.

This issue doesn't seem to have had any activity in a long time. We're working on prioritizing issues and resolving them as quickly as we can. To help us get through the list, we would appreciate an update from you to let us know if this is still affecting you on the latest version of Xamarin.Forms, since it's possible that we may have resolved this as part of another related or duplicate issue. If we don't see any new activity on this issue in the next 30 days, we'll evaluate whether this issue should be closed. Thank you!

Just tested it again and still a problem. Please don't close this issue.

  • Xamarin.Forms 4.8.0.1364
  • Visual Studio 2019 version 16.7.1
  • Platform Target Frameworks:

    • Android: 9.0

    • UWP: 10.0.18362

Was this page helpful?
0 / 5 - 0 ratings