This question is locked. New answers and comments are not allowed.
Hi,
on one of the pages of my app I'm showing news feed. Each news feed item has a complex and dynamic layout. It may contain several images, texts and so on.
I decided to go for lower level approach and implemented something I called MyVirtualizingPanel. Essentially it is a huge canvas, which should be placed inside scroll viewer. It tracks position of scrollviewer and loads/unloads its children based on known child height.
More details are here:http://stackoverflow.com/questions/14739563/windows-phone-virtualized-canvas-for-more-efficient-and-flexible-list-box-is-it
More or less it works. But. I do have problems with images: there are obvious 'lags' in scrolling when an item contains image.
I tried to use LowProfileImageLoader to fully control the process of loading images. It became better, but not good enough.
Now why I'm writing in this forum: after briefly looking into the DataBoundListBox code, I see that it uses similar approach with Canvas.
I created test project. https://dl.dropbox.com/u/16063542/TestVirtImages.zip (just fix the references)
It shows list of images using 4 approaches:
- my approach (simplified) with binding to ScrollVerticalOffset
- my approach (simplified) with handling CompositionTarget.Rendering
- Telerik DataBoundListBox
- Standard ListBox
(ignore outOfMemoryException)
It is obvious that my approach gives worse results.
Question: what am I missing, what am I doing wrong?
I'm going to try to look deeper into DataBoundListBox code to find the answer myself, but it might be easier if somebody who knows DataBoundListBox would have a look into my 100 lines solution.
Will really appreciate any help. My app is almost ready, this is last thing where I got stuck.
on one of the pages of my app I'm showing news feed. Each news feed item has a complex and dynamic layout. It may contain several images, texts and so on.
I decided to go for lower level approach and implemented something I called MyVirtualizingPanel. Essentially it is a huge canvas, which should be placed inside scroll viewer. It tracks position of scrollviewer and loads/unloads its children based on known child height.
More details are here:http://stackoverflow.com/questions/14739563/windows-phone-virtualized-canvas-for-more-efficient-and-flexible-list-box-is-it
More or less it works. But. I do have problems with images: there are obvious 'lags' in scrolling when an item contains image.
I tried to use LowProfileImageLoader to fully control the process of loading images. It became better, but not good enough.
Now why I'm writing in this forum: after briefly looking into the DataBoundListBox code, I see that it uses similar approach with Canvas.
I created test project. https://dl.dropbox.com/u/16063542/TestVirtImages.zip (just fix the references)
It shows list of images using 4 approaches:
- my approach (simplified) with binding to ScrollVerticalOffset
- my approach (simplified) with handling CompositionTarget.Rendering
- Telerik DataBoundListBox
- Standard ListBox
(ignore outOfMemoryException)
It is obvious that my approach gives worse results.
Question: what am I missing, what am I doing wrong?
I'm going to try to look deeper into DataBoundListBox code to find the answer myself, but it might be easier if somebody who knows DataBoundListBox would have a look into my 100 lines solution.
Will really appreciate any help. My app is almost ready, this is last thing where I got stuck.