SfListView allows us to adjust the parent height based on bind items when is Height by setting the height of VisualContainer to the height of StackLayout (parent for SfListView), it can be done by customizing the StackLayout as StackLayoutExt (parent for SfListView) in sample level. It will update whenever items are added or removed.
Please refer below code snippet for customizing StackLayout.
In the above code snippet, the internal LayoutChildren method is added to set the height of parent while layout the children.
Defining SfListView inside StackLayoutExt:
In the Loaded Event the total extent of VisualContainer is set as the height of StackLayout and the is changed with increased items which increases the height of SfListView along with the height of StackLayout.
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|
or the page will be automatically redirected to sign-in page in 10 seconds.