This question is locked. New answers and comments are not allowed.
Hello,
I try to display a large number (about 100) of big images (each about 1MB). The images are stored in the IsolatedStorage of the Device. If I added them direct to the project and add a list of Uris, the control works perfect.
But If I try to get the images from the storage I have some problems. If I use a BitmapImage Array as DataSource, where the files created out of an IsolatedStorageFileStream, I get of course an OutOfMemoryException.
If I try to use an LoopingListDataSource no images are displayed. My code looks like this:
Which options does I have to realize my scenario?
Thanks in advance!
I try to display a large number (about 100) of big images (each about 1MB). The images are stored in the IsolatedStorage of the Device. If I added them direct to the project and add a list of Uris, the control works perfect.
But If I try to get the images from the storage I have some problems. If I use a BitmapImage Array as DataSource, where the files created out of an IsolatedStorageFileStream, I get of course an OutOfMemoryException.
If I try to use an LoopingListDataSource no images are displayed. My code looks like this:
var source = new LoopingListDataSource(numberOfImages);source.ItemNeeded += ((sender, e) =>{ e.Item = new PictureDataItem();});source.ItemUpdated += ((sender, e) =>{ var bitmap = new BitmapImage(); using(var stream = Storage.GetFileStream(String.Format("{0}.jpg", (e.Index+1)))) { bitmap.SetSource(stream); } var picture = e.Item as PictureDataItem; if (picture == null) return; picture.Source = bitmap;});_slideView.DataSource = source;Which options does I have to realize my scenario?
Thanks in advance!