Description
When a FlexLayout contains a Label, and Label.Text is beyond a certain length relative to the length of the FlexLayout, FlexLayout will start layout its other children beyond it's own bounds.
Steps to Reproduce
- open the repro project
- a
Label should be shown containing multiple 'A's, along with a red and blue box, however the boxes will be hidden, only the Label will be visible
Changing the FlexLayout's WidthRequest can also produce some funny results. Sometimes the red and blue boxes will appear, but the FlexLayout will break it's WidthRequest to do so. Changing the length of Label.Text can also cause strange things to happen.
Link to public reproduction project repository
https://github.com/sjordanGSS/flexlayout-grow-test
Version with bug
9.0.40 SR4
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Tested on Android 11 and 13
Did you find any workaround?
Setting FlexLayout.Basis="1" and FlexLayout.Grow="1" on the Label will stop it from pushing other controls around and occupy the remaining available space. This is not a complete workaround but was enough for my purposes.
Relevant log output
Description
When a
FlexLayoutcontains aLabel, andLabel.Textis beyond a certain length relative to the length of theFlexLayout,FlexLayoutwill start layout its other children beyond it's own bounds.Steps to Reproduce
Labelshould be shown containing multiple 'A's, along with a red and blue box, however the boxes will be hidden, only theLabelwill be visibleChanging the
FlexLayout'sWidthRequestcan also produce some funny results. Sometimes the red and blue boxes will appear, but theFlexLayoutwill break it'sWidthRequestto do so. Changing the length ofLabel.Textcan also cause strange things to happen.Link to public reproduction project repository
https://github.com/sjordanGSS/flexlayout-grow-test
Version with bug
9.0.40 SR4
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Tested on Android 11 and 13
Did you find any workaround?
Setting
FlexLayout.Basis="1"andFlexLayout.Grow="1"on theLabelwill stop it from pushing other controls around and occupy the remaining available space. This is not a complete workaround but was enough for my purposes.Relevant log output