Skip to content

Latest commit

 

History

History

CollectionViewLoadMore

CollectionView for .NET MAUI - Infinite Scrolling

This example demonstrates how to implement infinite scrolling in CollectionView.

Implementation Details

  • Set the IsLoadMoreEnabled to true to enable infinite scrolling in CollectionView.

  • Bind the DXCollectionView.LoadMoreCommand property to a view model's command that loads new items. CollectionView automatically invokes this command when a user scrolls content to the last loaded item.

  • Set the LoadMoreCommand's CanExecute property to false to disable infinite when the scroll position reaches the last record in CollectionView.

  • You can set the IsRefreshing to true to display a wait indicator while CollectionView is loading a new portion of data. Once the load operation is complete, set IsRefreshing to false to update displayed data.

  • To load only the next portion of data, you can store a number of displayed rows and pass it to the Skip method. Then, pass the number of rows that you want to display in CollectionView to the Take method.

    allBlogs.Skip(startIndex).Take(batchSize);
    

    File to look at: MainViewModel.cs

  • Call the Browser.OpenAsync and Share.RequestAsync methods to open a blog post in a browser and display the native share dialog.

Files to Look At

Documentation

More Examples