How can I unattach an element from another element in the XAML tree?
- by Edward Tanguay
In my Silverlight application, I load all the images I need at application start and store them in a dictionary.
Then as I need them I pick them out of the dictionary and attach them in XAML trees etc.
However, I have the problem that if I attach an Image object to a Grid, then want to use that image again, it tells me:
The image element is already a child
of another element.
How can I run through my dictionary and "detach all images from parent XAML elements"?