The
RadListViewcontrol is obsolete and will be removed in Q2 2026. Use the RadCollectionView control instead. TheRadCollectionViewis a complete, ground-up rewrite of the ListView. TheRadCollectionViewoffers improved performance, enhanced features, and a modernized approach to managing lists of data. TheRadCollectionViewincorporates all of the ListView's key features. More about the differences between both components and how to migrate to the newRadCollectionViewis available in the Migrating the Telerik .NET MAUI RadListView to RadCollectionView article.
.NET MAUI ListView Load on Demand
Loading a large data set on a mobile device has its challenges. One of the most popular approaches is using incremental data loading when the items need to be visualized. The ListView does this by using its load-on-demand functionality.
Configuration
The following properties control the LoadOnDemand feature:
IsLoadOnDemandEnabled(bool)—Used to enable the load on demand mechanism of the ListView.IsLoadOnDemandActive(bool)—Used to control the loading indicator that is rendered when the data is retrieved asynchronously. Set it toTruewhen an async operation is running and items are loading. Set it toFalsewhen the items are loaded.LoadOnDemandMode—Used to set the loading mode. You can select between:Automatic—The data is requested automatically when you scroll near the end of the ListView.Manual—A button is rendered at the end of the ListView. The data is requested explicitly by pressing the button.
Methods to Load Data on Demand
Three options to load the data on demand, regardless of whether you use the Automatic or Manual loading mode:
- Create a
ListViewLoadOnDemandCollectioninstance as a source and pass it to the ListView Items Source property. - Subscribe to the
LoadOnDemandevent and add the loaded data to the source. - Use the
LoadOnDemandUser Command and add the loaded data to the source.
All three approaches for loading items on demand in the ListView work with both the automatic and manual
LoadOnDemandMode.
Using LoadOnDemandCollection
To load items on demand, you can use the ListViewLoadOnDemandCollection and set it as an ItemsSource for the ListView. The ListViewLoadOnDemandCollection accepts an action in the constructor and this action is later executed by the ListView in a non-UI thread when new items are requested.
Using LoadOnDemand Event
Another way to handle loading more items is to use the LoadOnDemand event. This event is raised on a UI thread, so in the event handler you can add items right away or asynchronously:
- In case the data is available right away, add the items to the ListView
ItemsSourcein theLoadOnDemandevent handler. - If you require an async operation, set the
IsLoadOnDemandActiveproperty of the ListView toTrue. This notifies the ListView that it must display the loading indicator. Then an async call can be initiated to get the data. When the new items are ready, you must set theIsLoadOnDemandActiveproperty toFalseagain to notify the ListView that the load-on-demand operation is completed.
Using LoadOnDemand Command
This approach is similar to using the LoadOnDemand event, but in this case, the load-on-demand is handled in the ViewModel through the LoadOnDemandUserCommand exposed by the ListView. In the Execute method of the command, you can add items right away or asynchronously:
- If the data is available right away, add the items to the ListView
ItemsSourcein theLoadOnDemandcommandExecutemethod. - If you require an async operation, set the
IsLoadOnDemandActiveproperty of the ListView toTrue. This notifies the ListView that it must display the loading indicator. Then an async call can be initiated to get the data. When the new items are ready, you must set theIsLoadOnDemandActiveproperty toFalseagain to notify the ListView that the load-on-demand operation is completed. You can control the behavior ofIsLoadOnDemandActivethrough a binding to a boolean property in theViewModelclass.
Advanced Options
You can also use the ListView options for performing advanced control over its load-on-demand feature.
Control the Number of Pre-loaded Items
This feature works in conjunction with the LoadOnDemandMode.Automatic mode of the ListView. You can control the minimum number of items loaded ahead through ListView LoadOnDemandBufferItemsCount property. By default, the property is for 10 items. When ListView requests an item in the buffer, it will trigger a new loading batch.
Change the Appearance of the Manual Load Button
This feature works in conjunction with the LoadOnDemandMode.Manual mode of the ListView. You can control the content of the Load More Button through the LoadOnDemandItemTemplate property.
Change the Appearance of the Manual Loading Indicator
This feature works in conjunction with the LoadOnDemandMode.Manual mode of the ListView.
You can control the content of the Loading Indicator through the LoadingOnDemandItemTemplate property.