maui
maui copied to clipboard
Label control's height does not increase dynamically.
Description
I have taken a label control inside CollectionView to display some information. Now the data for label control comes from the Rest API service dynamically. So, some of the items have long information, which is getting displayed on the label. But Label's height is not getting increased as it does get in Xamarin.Forms.
I have attached screenshot for the refernce.
Steps to Reproduce
- Create a File > New .Net MAUI App
- Take a
CollectionView
control like:
<CollectionView
ItemsSource="{Binding Products}"
ItemsLayout="VerticalList">
<CollectionView.ItemTemplate>
<DataTemplate>
<!--....-->
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
- Run the app and check the output
Expected outcome: It should increase the size of the label and the entire frame accordingly.
Actual outcome:
Link to public reproduction project repository
https://github.com/divyesh008/MauiLabel_Bug2
Version with bug
6.0 Release Candidate 2 or older
Last version that worked well
6.0 Release Candidate 2 or older
Affected platforms
iOS, Android, Windows
Affected platform versions
iOS 15, Android 10, 11 and up
Did you find any workaround?
No, I have tried to use ListView control as it does have HasUnevenRows property but it does not work. Same with FlexLayout and Bindable StackLayout control.
Relevant log output
No response