Click here to Skip to main content
15,880,392 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have been working on a WP8 app,I am working image gallery app,,Here I have been using pivot control &list box to collect Camera Roll images(dynamically) from the device and swipe one by one,it is working fine But I found app's memory consumption is raising and How to resolve this?

I am trying to figure out how to code a program where I have an list of images, where only one image is shown at a time, but the adjacent images are preloaded but not visible. After each flick, the now current image animates itself over to the visible area, and the adjacent images are updated, but not visible until the next flick in either direction. I only want to have 3 'boxes'(cycle),consisting of the image to the left, current image on screen, and the image to the right. If revolving to the right, the current image becomes the left image, the image to the right becomes the current image, and the next image is preloaded but not visible.

Example:

First image you see is when the app is loaded. It's essentially the first image in the List box .Call it (Image 1).

You cannot flick to the left, as no image is there. But the image to the right of it (not visible yet) is already preloaded and ready to slide when the flick is registered. (image 2)

So if we flick to the right, Image 1 is to the left of the now visible and centered Image 2. Image 3 is now to the right, not visible but preloaded. Image 1 is now to the left, not visible but preloaded.

**I only want to have 2 things preloaded now, so you can imagine 3 slots. One slot is the left picture. One slot is the current view, and one slot on the right.

The idea is to be able to have a carousel of images, but only preloading the images to the left and right of the current view. Open page bind to a list of images, close page. If anyone solve these problem then please provide simple code for these problem.
Posted
Comments
Siddhanath Jadhav 26-Dec-13 1:38am    
I need it fast Please provide simple code for this If anyone solve this problem.I've try to solved this problem in this way: but still pending. in my view model I've declared a function that will keep only 1 images on left and 1 images on right,1 images on current (images are collected from camera roll )
Siddhanath Jadhav 26-Dec-13 3:19am    
Hi,Here i have modify pivot control to Panorama to swipe images one by one,,can anyone provide simple code for below requirement.I have use list box to collect all images from camera roll and use Panorama to swipe images one by one.The problem was to swipe images it gives all images memory size.that's why i have try to only 3 images in memory "First,Next,Last" images add at a time if user swipe left direction first image then previous image delete also that time add next images also if user swipe right direction for current image then delete next image also add previous image to in these cycle etc way only 3 images store in memory &these images change cycle.If anyone solve these problem then send me simple code for above query.
Siddhanath Jadhav 30-Dec-13 1:06am    
Hi all,I need it fast Please provide simple code for this.Only I have need to update pivot items when change images position.It is working properly images change but previous image does not release memory thats why some images swiping "OutOffMemoryException" Occure to implement 3 image cycle slot, FIRST,NEXT,PREVIOUS,IF i swipe first image then next image come first image position,also next image position pickup list box new image (Serially) Also delete First image etc.cycle wise.Here i have try to swipe imag

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900