This repository has been archived by the owner on May 1, 2024. It is now read-only.
Unable to change ListView/CollectionView height using layout flags #6882
Labels
a/collectionview
a/listview
Problems with the ListView/TableView
s/unverified
New report that has yet to be verified
t/bug 🐛
Description
ListView and CollectionView controls are trying to take as much space as possible providing no control over this behavior to an end-user. The only working option as of now is to calculate the control height based on the number of items and each item height which is not always a good option. The image attached reflects the issue, with free space after ListView.Footer which should be given to the next control in StackLayout/FlexView.
Steps to Reproduce
Expected Behavior
The ListView control takes space only needed to render 3-4 items and leave the rest to the other controls in the StackLayout control
Actual Behavior
The ListView control takes all space available leaving an empty space after the footer instead of giving this space to the other controls in the StackLayout control
Basic Information
Screenshots
Reproduction Link
I have created a sample project to reproduce this issue here:
https://github.com/alexeystrakh/xamarin-listview-dynamicheight
I have also found a few references on the Internet about the same issue our community is trying to solve:
https://xamarinsharp.com/2017/05/16/listview-height-issue-in-xamarin-forms-how-to-solve-it/
The text was updated successfully, but these errors were encountered: