Reputation: 647
I need to add nearly 400 images.I want to dispaly single image for each panorama item. If i add more than 25 images to the panorama item, the page hangs and stack error occurs. whats the solution for this...
Upvotes: 0
Views: 318
Reputation: 66882
Panorama is the wrong control for this. The panorama is written so that every single item is loaded into memory - so loading 400 will result in out-of-memory and hanging type issues. If you really want to use Panorama then you could use the SelectionChanged event to control which panorama items actually contain content, but really I think this might not work even then...
Pivot would be a better choice - that just loads the current, previous and next at any one time. As with Panorama, it might also be useful to use SelectionChanged in your Pivot too - To that might help with loading times if nothing else.
Stuart
Upvotes: 1