New to Telerik UI for .NET MAUI? Start a free 30-day trial
Migrating the Telerik .NET MAUI ListView to CollectionView
The Telerik UI for .NET MAUI CollectionView control has been designed and built as a new control which provides the same functionality as the Telerik .NET MAUI ListView control, but at the same introduces a slew of enhancements, aimed at resolving existing issues, boosting performance, and facilitating effortless customization.
API Differences
When migrating the Telerik .NET MAUI ListView, consider the following differences in the API:
Telerik .NET MAUI ListView | Telerik .NET MAUI CollectionView |
---|---|
Presenting the data through cells—ListViewTextCell , ListViewTemplateCell | Presenting the data through a DisplayMemberPath property or by defining an ItemTemplate |
Selection—None , Single or Multiple , provide an option to set selection gesture - Tap , Hold | Selection—None , Single or Multiple , no selection gesture |
Grouping through PropertyGroupDescriptor or DelegateGroupDescriptor , methods for expanding/collapsing groups, multi-level grouping, sticky group headers | Grouping through PropertyGroupDescriptor or DelegateGroupDescriptor , methods for expanding/collapsing groups, multi-level grouping, no sticky group headers |
Sorting through PropertySortDescriptor or DelegateSortDescriptor | Sorting through PropertySortDescriptor or DelegateSortDescriptor |
Filtering through DelegateFilterDescriptor | Filtering through various filter descriptors, such as TextFilterDescriptor , NumericalFilterDescriptor , etc |
Header and Footer templates | Header and Footer templates |
Load On Demand—Automatic and Manual, items can be loaded on demand through a ListViewLoadOnDemandCollection , a LoadOnDemand event or LoadOnDemand ListViewUserCommand | Load On Demand—Automatic and Manual, items can be loaded on demand through a LoadOnDemandCollection , a LoadOnDemand event or LoadOnDemandCommand |
Scrolling—VerticalScrollBarVisibility property, ScrollItemIntoView method | Scrolling—ScrollItemIntoView method, Scrolled event |
Linear and Grid Layouts | Linear and Grid Layouts |
Cell Swipe with ItemSwipeContentTemplate and SwipeOffset | Item Swipe with StartSwipeTemplate , EndSwipeTemplate , StartSwipeLength and EndSwipeLength properties |
Pull To Refresh built-in funcionality | Refresh Data functionality through a RefreshView control |
Reorder Items with IsItemsReorderEnabled property | Drag and Drop feature with IsDragDropEnabled property, customizable DragDropBehavior |
N/A | Empty Template feature through EmptyContentTemplate and EmptyContentDisplayMode |
Events—ItemTapped , ItemHold , GroupHeaderTapped , RefreshRequested , SelectionChanged | Events—ItemTapped , GroupTapped , Scrolled , SelectionChanged |
Predefined commands through CommandId enumeration | Commands - ItemTapCommand , GroupTapCommand , Item Swipe commands, LoadOnDemand commands |
Styling—ItemStyle , SelectedItemStyle , PressedItemStyle , ReorderItemStyle , ItemStyleSelector , GroupHeaderStyle | Styling—ItemViewStyle with visual states, DragVisual, ItemViewStyleSelector , GroupViewStyle , GroupViewStyleSelector |