Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FlexLayout doesn't measure out to full height when placed inside ScrollView #3848

Closed
PureWeen opened this issue Dec 23, 2021 · 2 comments · Fixed by #6085
Closed

FlexLayout doesn't measure out to full height when placed inside ScrollView #3848

PureWeen opened this issue Dec 23, 2021 · 2 comments · Fixed by #6085
Assignees
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! p/0 Work that we can't release without s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@PureWeen
Copy link
Member

Description

If you have a FlexLayout inside a ScrollView the FlexLayout will only ever measure to the height of the ScrollView

        <ScrollView Grid.Row="1" HeightRequest="300">
            <FlexLayout
                Direction="Row"
                Wrap="Wrap"
                AlignItems="Center"
                AlignContent="Center"
                BindableLayout.ItemsSource="{Binding Items}"
                BindableLayout.ItemTemplate="{StaticResource ColorItemTemplate}" />
        </ScrollView>

If you replace the FlexLayout with a StackLayout then you're able to Scroll.

Steps to Reproduce

ScrollViewFlex.zip

  1. run project
  2. you should be able to scroll up and down and see more squares
  3. if you switch to a StackLayout then it's scrollable

Version with bug

Preview 11

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows, macOS

Affected platform versions

All of them

Did you find any workaround?

If you set an explicit height on the FlexLayout then you can scroll the FlexLayout

Relevant log output

No response

@PureWeen PureWeen added the t/bug Something isn't working label Dec 23, 2021
@PureWeen PureWeen changed the title FlexLayout doesn't measure out to full width when placed inside scrollview FlexLayout doesn't measure out to full height when placed inside ScrollView Dec 23, 2021
@chris-ux
Copy link

chris-ux commented Dec 23, 2021

Alternatively, when not in ScrollView, the height of the FlexLayout grows "infinitely", seemingly unaware of the height of its content. Submitted issue: #3852

@Eilon Eilon added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label Feb 10, 2022
@v-xiaofchen
Copy link

Verified repro with windows and the above project.

@v-xiaofchen v-xiaofchen added the s/verified Verified / Reproducible Issue ready for Engineering Triage label Feb 24, 2022
@hartez hartez added this to the 6.0.300 milestone Mar 22, 2022
@davidortinau davidortinau added the p/0 Work that we can't release without label Apr 28, 2022
@ghost ghost locked as resolved and limited conversation to collaborators May 29, 2022
@samhouts samhouts added the fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! label Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! p/0 Work that we can't release without s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
7 participants