I'm using ListBox which has VirtualizingStackPanel
, which is said to support UI virtualizing by default.
However, when I set my listStudent (of type ObservableCollection
, and have 5 Students in it) as ItemsSource
for my Listbox
. Then whenever user scroll to the end, I add another 5 Students to my listStudent (and of course UI is notified). But I see that memory consumed keep increased. There's no different from StackPanel
in term of memory
How UI virtualization work? How to keep memory low when adding new item to listStudent?