Silverlight - Databinding Images to URIs
Mike's already blogged about this one so I'll simply highlight his post. I was building a simple music jukebox app to demo OpenFileDialog and IsolatedStorage. You can select some tracks to play and add them to a queue. The queue is maintained in isolated storage so queued tracks persist through a re-start. The app also uses a bit of WCF to resolve the URIs for the album cover image and the wma file.
All was well until I came to databind the images. This had worked when I'd set the image sources from code but when I started databinding them, no images appeared. Set the URI in XAML, all works fine. Via databinding, no image. The crux of the matter is that I was binding to a URI and there being no default converter for Uri to ImageSource (there is for String to ImageSource so setting in XAML works), it fails.
Read all about it in Mike's post.
Technorati Tags: silverlight,databinding
Comments
Anonymous
September 11, 2008
PingBack from http://www.easycoded.com/silverlight-databinding-images-to-uris/Anonymous
September 11, 2008
PingBack from http://informationsfunnywallpaper.cn/?p=4951Anonymous
September 11, 2008
Hi Mike, That's a bit spooky - I went through the exact same thing last week. My attempted solution is here (actually pretty similar to Mikes): http://shrinkster.com/125i Cheers IanAnonymous
September 11, 2008
The comment has been removed