Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[UWP] Height calculations for content within a layout not calculation correctly for wrapping content like flex and text #4875

Open
pizzahead24 opened this issue Dec 31, 2018 · 4 comments
Labels
a/layout e/4 🕓 4 help wanted We welcome community contributions to any issue, but these might be a good place to start! inactive Issue is older than 6 months and needs to be retested p/UWP t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!

Comments

@pizzahead24
Copy link

pizzahead24 commented Dec 31, 2018

Description

Height calculations for content within a layout not calculation correctly for wrapping content like flex and text

Steps to Reproduce

https://forums.xamarin.com/discussion/145900/long-label-with-word-wrap-doesnt-seem-to-auto-calculate-height-correctly#latest

To produce the full error (label wrap and flex content):

1.) Create a flex layout.
2.) Inside the layout create several other stack layouts Horizontal with title and value labels inside. Create 5 of them and make the Text of them very long (look at the forum link above).
3.) Now divide these content within so that when you grow and shrink the content will wrap into one column or two. What I did was split it up 3 - 3 left and right and have a flex basis on the left of 300. This should make the parent flex layout wrap the right side under once the width reaches 300.
4.) When you grow and expand on UWP you can see the text gets cut off. You can also see the layout straight up wont expand all the way because the wrapping text height for some reason wont notify the parent layout to expand that much more.
I my code example I set different background colors to that layouts containing the content. Notice the background color wont color the whole layout because I think it is having height calculation issues with the wrapping text.

Expected Behavior

The height of wrapping text and layouts should notify its parent to update its overall height and not cut things off.

Actual Behavior

text and content are being cut off by the height because the wrapping features are not updating the parent layouts height.

Basic Information

  • Version with issue: Latest Xamarin Forms 3.3
  • Affected Devices: All, but much easier to visibly watch the flex layout with UWP.

Screenshots

Please check out the forum link above.

Repo with example code:
https://github.com/pizzahead24/XamarinWrappingBug

@pizzahead24
Copy link
Author

wrappingbugxam2

@PureWeen PureWeen changed the title Height calculations for content within a layout not calculation correctly for wrapping content like flex and text [UWP] Height calculations for content within a layout not calculation correctly for wrapping content like flex and text Jan 3, 2019
@PureWeen
Copy link
Contributor

PureWeen commented Jan 3, 2019

Possibly related to
#2172
#1538

@pizzahead24
Copy link
Author

#4950 This is related

@samhouts samhouts added inactive Issue is older than 6 months and needs to be retested help wanted We welcome community contributions to any issue, but these might be a good place to start! up-for-grabs We welcome community contributions to any issue, but these might be a good place to start! labels Oct 2, 2019
@samhouts samhouts added this to the 5.0.0 milestone Aug 13, 2020
@samhouts samhouts removed this from the 5.0.0 milestone Nov 2, 2020
@hamzaoubouzid
Copy link

hi @pizzahead24
thank for all Just i have one question about flexlayout in xamarin
i create design xml but when i am binding flexlayout width my list in c#
it not work and i serch and not get eney enswer about this probleme

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/layout e/4 🕓 4 help wanted We welcome community contributions to any issue, but these might be a good place to start! inactive Issue is older than 6 months and needs to be retested p/UWP t/bug 🐛 up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!
Projects
None yet
Development

No branches or pull requests

4 participants