I don't understand what is different in Xamarin Form by new version 4.0 between old ListView and new CollectionView. Why is better to use CollectionView?
I se help in microsoft docs, but don't se anything better.
public CollectionView ();
The ListView class supports a number of interaction styles. Pull-to-refresh allows the user to pull the ListView down to refresh the contents. Context actions allow the developer to specify custom actions on individual list items. For example, you can implement swipe-to-action on iOS, or long-tap actions on Android.
CollectionView is built to be fast, uses modern, native controls, and removes the concept of ViewCells. CollectionView is available on iOS and Android, but is only partially available on the Universal Windows Platform. In this article, we'll dive into some of the main features of CollectionView in Xamarin Forms .
The Xamarin. Forms FlexLayout is new in Xamarin. Forms version 3.0. It is based on the CSS Flexible Box Layout Module, commonly known as flex layout or flex-box, so called because it includes many flexible options to arrange children within the layout.
The CollectionView is a flexible and performant view for presenting lists of data using different layout specifications.
BUT The ListView is an ItemsView that displays a collection of data as a vertical list.
Conclusion: if you want to display things vertically use ListView, if you want do display things with your own style use CollectionView
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With