Add incremental loading sample page and documentation#410
Merged
Conversation
- New IncrementalLoadingPage in sample app with simulated paged data source - New docs/docs/incremental-loading.md article with toc entry - Fix outdated performance.md note claiming incremental loading is unsupported Co-authored-by: Copilot App <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
TableViewalready supports incremental loading - its internal collection view forwardsHasMoreItemsandLoadMoreItemsAsyncto anyItemsSourceimplementingISupportIncrementalLoading- but this was undocumented, and the performance guide incorrectly stated the feature was unsupported. There was also no sample demonstrating it.What's changed
Sample app
IncrementalLoadingSource- anObservableCollection<ExampleModel>implementingISupportIncrementalLoadingthat simulates fetching pages from a remote service (750 ms delay, capped at 1,000 items).IncrementalLoadingPageusingSamplePresenter, withIncrementalLoadingTrigger/IncrementalLoadingThreshold/DataFetchSizeset on the TableView, an options panel showing loaded item count,HasMoreItemsstate, and an indeterminate progress bar while a page loads. XAML and C# source snippets included.MainWindow.Docs
docs/docs/incremental-loading.mdcovering how to implement an incremental source, the inheritedListViewloading properties, manual loading from code, and caveats (sorting/filtering/clipboard/export operate only on loaded items).performance.mdthat claimedISupportIncrementalLoadingwas not supported.