Adding hundreds of images to a WP7 listbox from Isolated Storage, how can I utilize Data Virtualization?

Here is a proper implementation of data virtualization: blogs.msdn.com/b/ptorr/archive/2010/08/1....

Up vote 1 down vote favorite share g+ share fb share tw.

I am trying to add images to a listbox with a "continuous scroll" so the user does not have to press any buttons etc to load the next set of images. The images are stored in Isolated Storage. I will be starting with 500 images.

Loading 500 images to a listbox obviously does not work and just eats up all resources in a few seconds. Based on my research I need to use data virtualization so the images are retreived when they are required (on-screen) and disposed of when not-required (of-screen), as opposed to loading them all at once. I have searched the web for examples but have only been able to find code which retreives and displays text etc to populate the listbox as oposed to images stored in IS.

I "belive" I need to use an Image within a Data Template, within a listbox and then bind to an IList using a custom class. I can bind the list box to a basic IList and that works ok (only 50 images) but when it comes to creating a custom class etc its over my head. Does anyone have an example of what I need that they would be happy to share?

I havent been programming a year yet and have found most of my App requirements to be achievable with a litte research but I cant find any good pages or video that explains this exact requirement and its driving me crazy as I have spent days on it. Failing that I will have to pay Telerik for their support and use their DataBoundListBox or pay a third party to write it for me, but I thought I would try here before parting with hundreds of dollars! Thanks for your time(s) in advance!

Silverlight windows-phone-7 link|improve this question asked Feb 18 at 18:22n00be133.

Here is a proper implementation of data virtualization: blogs.msdn.com/b/ptorr/archive/2010/08/1... This is how you bind images to the image control: Image UriSource and Data Binding.

To get data Data Virtualization on the Windows Phone 7 you can use the VirtualizingStackPanel class. In the MSDN you can find all the properties you may want to set. To use the control you put your list inside this control: Since you would like to have a tutorial I can point you to Jevgeni Tšaikin blog post on ItemsControl virtualization.

If you want more check out the post from Shawn Oster on Improving ListBox Performance.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions