views:

574

answers:

1

I have a ListBox that may have many rows of templated DB records, including an Image, bound to an ObservableCollection. Sometimes the Collection could hold thousands of items.

The performance is great, but the Scrolling is the default jumpy behavior. I would like it to have Smooth Scrolling, so I unchecked ScrollViewer.CanContentScroll.

Now I have SmoothScrolling, but the performance is horrendous: the data is retrieved in a separate thread, and the thread finishes quickly, but it takes 10-20 seconds for the results to show in the ListBox. I assume that this is because unchecking ScrollViewer.CanContentScroll changes the underlying VirtualizingStackPanel to a regular StackPanel and so it is loading the entire collection before displaying the results.

So my question is this: how do I retain the the smooth scrolling without sacrificing the VirtualizingStackPanel behavior and performance?

A: 

Hi Joel.

When you uncheck CanContentScroll, you loose virtualization. And the answer is really frustrating: For now there is no out-of-the-box solution :(.

PS: This is not the first post here, asking this very question.

Anvaka
I was afraid of that but had to ask. I searched before asking but didn't find that post. I might dig just a little bit more, but time is limited so I'll have to lose Smooth Scrolling for now.
Joel Cochran