On the previous version of SfListView, unless I declared fixed size of the listview it autosized depending on the size of element displayed. However, after I updated to the newest version (184.108.40.206), by default it displays all items and a huge blank space underneath them. Is there a way to correctly autosize listview?
JNJayaleshwari N Syncfusion Team November 16, 2018 02:12 AM
Thanks for Contacting Syncfusion Support.
We have checked the reported query “SfListView displays empty space under the last item” from our side.We would like to know that we have modified the behavior of SfListView when loaded inside layouts such as Grid, StackLayout and ScrollView. In these layouts, the SfListView works similar to Xamarin.Forms ListView. We have already mentioned regarding this in our release notes and you can refer the same from the below link.
We would like to inform that the SfListView measures and allocates size only when its parent element calls for Measure to calculate the size of the child element(i.e., In this case SfListView) to render in the View. When RowDefinition is ‘*’, SfListView OnMeasure won’t be called from its parent element Grid. Same thing applies for StackLayout when loaded in Grid ‘*’ RowDefinition. So even when we define HeightRequest for SfListView, it will be ignored.
So if you want to load the SfListView in exact height as its extent, load it inside Grid ‘Auto’ RowDefinition and set its TotalExtent to its HeightRequest as below.
We have updated this in UG documentation also. You can refer from the following location.