The rest of the error message is the important bit
Quote:
Additional information: Specified element is already the logical child of another element. Disconnect it first.
You need to create the image within the
foreach
loop
You also need to put that stack panel into the visual part of your app (as a child of whichever container you are using in your XAML), otherwise you will never see the images