Windows Phone 7 Control Caching - 'Element is already the child of another element'

Posted by will on Stack Overflow See other posts from Stack Overflow or by will
Published on 2011-01-16T22:24:57Z Indexed on 2011/01/17 0:53 UTC
Read the original article Hit count: 129

I'm trying to speed up my windows phone 7 page load times. I have a 'static' page that has a dynamically created in a Panorama control - static meaning that the content never changes.

On the first load I look at my config file, create the individual PanoramaItem controls and add them to the main Panorama control. I'm trying to keep a List in a static place so that the initial creation would only happen once and I could just add a fully rendered version to my Panorama control when the page was rendered.

Works fine on first load, but when I try to add the cached PanoramaItems to the Panorama control I get the message "Element is already the child of another element". This makes sense since I already added before. But I can see a way to disconnect the PanoramaItems with the first Panorama control...

I could be going about the control caching thing all wrong as well... Let me know if there's another way to do this.

© Stack Overflow or respective owner

Related posts about silverlight-4.0

Related posts about windows-phone-7