Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between the old ListView and new CollectionView in Xamarin 4?

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 ();

like image 852
Anton Nikolayevich Avatar asked May 23 '19 05:05

Anton Nikolayevich


People also ask

What is ListView in xamarin forms?

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.

What is the use of Collection View in Xamarin forms?

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 .

What is Flex layout 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.


1 Answers

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

like image 92
Shannarra Avatar answered Oct 04 '22 04:10

Shannarra