Howdy again, I've never tried what you're doing and a search combined with
a quick test shows this works:
if (Clipboard.ContainsFileDropList())
{
string name0 = Clipboard.GetFileDropList()[0];
byte[] buff = File.ReadAllBytes(name0);
var bmpi = new BitmapImage();
bmpi.BeginInit();
bmpi.StreamSource = new MemoryStream(buff);
bmpi.EndInit();
imgPreview.Source = bmpi;
}
So this means you can get a BitmapSource off the clipboard (ignoring the
bug report I found for now) and use an Encoder of the type you like to get
the bytes, or you can get the bytes from file name(s) on the clipboard.
Either way it looks like there is a way to get all the combinations of
names, images and bytes you would need to put in your bound collection. A
smart binding converter behind the tree could accept anything as a source
and give you back an image to render.
Greg