I created a simple application with ListBox and 1000 very short strings in it. (no explicit ItemTemplate).
If i scroll it really fast – there are black holes(CPU cant render fast i suppose).
At the same time if i use ItemsControl in ScrollViewer – everything is OKay.
Why ? Can i slow down scrolling speed in ListBox somehow ?
Users can get really confused when they are to see these black holes in the screen.
Update: Reproduces on device(HTC HD7 7.10.7740). I use databinding via ItemSource
Repro project: https://www.dropbox.com/s/lgcod878srnctp0/SLTK_LLS_TEST.zip
Repro video(!): https://www.dropbox.com/s/t25dguq0vaa88o9/WP_20111213_113729Z.mp4
The
ListBoxhas “virtualization” enabled by default (exactly: sort of UI container virtualization), it’s not loading the complete list, just fragments. When scrolling, it has to render the items first, and when you scroll quickly, you are noticing this rendering delay. It’s achieved by theVirtualizingStackPanel. The advantage is, it saves Memory.You can disable the virtualization when using a custom
ItemsPanel:…but the solution will take up more resources from the beginning. Might become dangerous with long lists.
The other way round, you can enable virtualization on your
ItemsControl, for a testing purpose, you should be able to achieve the rendering delay (“black holes”).