[Windows] CollectionView RemainingItemsThresholdReachedCommand not working
Description
When trying to scroll a CollectionView with RemainingItemsThresholdReachedCommand on Windows, further items in the CV do not load, and the list bounces back up to the top.
Related / potentially same issue: https://github.com/dotnet/maui/issues/9935
Steps to Reproduce
- Run internal ManualMauiTests repo on rc2
- Deploy to Windows machine with touch support (i.e. Surface Book 3)
- Navigate to test G6 and follow on-screen instructions
- Scroll CollectionView via touch, repeatedly
- Notice CV consistently bounces back to the top
Link to public reproduction project repository
internal
Version with bug
Unknown/Other
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
reproducible in net7 as well
Also reproduces in all versions of 8.0.0, so this doesn't look like a regression.
Any workarond for the "list bounces back up to the top" part of this issue? The RemainingItemsThresholdReachedCommand is called and I can add items to list, but it scroll always to top :( I'm on net8.
Verified on the latest main build, can repro on 8.0.6 and latest maui-nightly build 8.0.10-nightly.10215+sha.ce90b585c6-azdo.9163364.
I tested it using my laptop’s touchpad, and the results are as follows:
Tested on the latest Microsoft.Maui.Controls 8.0.60-ci.net8.24272.1, the scroll bar rolls back and there is a blank line between different numbers
Our MAUI Windows app will not reap the performance gains of loading data incrementally because we cannot allow this type of scrolling experience. Until this is fixed, we will unfortunately have to add platform code to populate our collection view in one go just for Windows.
There is a property ItemsUpdatingScrollMode which specifies scrolling behavior upon updating items. On Windows, this defaults to KeepItemsInView while all the other platforms default to KeepScrollOffset. KeepItemsInView resets the scroll bar to the top. I would suggest Windows to default to KeepScrollOffset at least for collection views to match other platforms. @MattePozzy you should try setting this property if you haven't already.