High-performance scroll FFImageLoading Win3 #31441
Replies: 1 comment
-
What if you listen on "scrolled" event at CollectionView. In this Register method, you add a semphare call, so if there are multiple events fired, you only check for one. You have an array, when image is loaded, you enter this image to this array, so the image from array is used, instead of loading them all the time. The default image is "loading image" ... so when you scroll, you know images are loading and then when image is sucessfully loaded, you replace this image with yourImageElementinXaml.source = newImage. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm building a desktop application using .NET MAUI (Windows) that displays a large number of images (between 200 and 1000) in a CollectionView. However, I'm facing serious performance issues when scrolling:
When scrolling quickly, the app crashes without clear errors or logs
I've tried performance optimizations, but the CollectionView in .NET MAUI still lacks full high-performance scrolling support on desktop
I found code using ScrollStateChanged (as in WinUI 3), but it's not directly supported in .NET MAUI.
_myListView.ScrollStateChanged += (object sender, ScrollStateChangedEventArgs scrollArgs) => {
switch (scrollArgs.ScrollState)
{
case ScrollState.Fling:
ImageService.Instance.SetPauseWork(true); // all image loading requests will be silently canceled
break;
case ScrollState.Idle:
ImageService.Instance.SetPauseWork(false); // loading requests are allowed again
}
};
I'd appreciate help with:
Whether there's a viable alternative to CollectionView for high-item-count scenarios
Beta Was this translation helpful? Give feedback.
All reactions