Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

ListView virtualization stops when using ObservableCollections

$
0
0

Hi all,

I'm working with a ListView. Basically if you populate items in to an ObservableCollection before setting them it virtualizes the items nicely.
So say I add 20 items, but only 9 are on the screen, the SetupContent override on ListView is only called for those first 9 items. As I scroll down, SetupContent is called for the new items as they are needed. Just as it should.

But, if you then add more items, say another 100 items to the ObservableCollection later... SetupContent is called for all those items straight away. No more virtualization!

Help!


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>