Tags: Blog |
Categories: Blog
Posted by
admin on
4/22/2009 3:27 PM |
Comments (3)
This is a very simple code snip. This code below downloads an image, you expecting the events ImageFailed or Loaded to be called, none of them will be called. Is this a Silverlight bug?
Image image = new Image();
BitmapImage bi = new BitmapImage(new Uri(“http://weblogs.asp.net/blogs/albertpascual/Al%20Pascual%20tyniest.jpg”, UriKind.RelativeOrAbsolute));
image.ImageFailed += (object senderFailed, ExceptionRoutedEventArgs eFailed) =>
{
// Handle the image failing
MessageBox.Show("Image Failed");
};
image.Loaded += (object senderLoaded, RoutedEventArgs eLoaded) =>
{
// Delete this
MessageBox.Show("Image Loaded");
};
image.Source = bi;
I reported this error on this thread, if any Silverlight knows the answer please contribute to the it.
Cheers
Al
bfc88ed4-3909-4f99-92a4-ab3dc974525a|0|.0