Showing download progress for image management in WP7

How to get the download with the percentage of downloaded information when downloading the image?

I have it:

Image image = new Image(); image.Source = new BitmapImage(new Uri("http://somesite.com/someimage.jpg")); 

I was expecting something like this:

 image.Loading += RoutedEventHandler(image_Loading); 

but I can’t find such an event. There is Loaded (not related to loading the source), but ImageOpened (which is launched after loading the source, completed and completed the layout).

I know that this is possible because I have seen other applications show the progress of loading images (for example, "img news reader"). Is this possible with the standard Image Control, is there a third-party control that provides this, or do I need to write my own?

+4
source share
1 answer

DownloadProgress is the event I was looking for and it was hiding in the BitmapImage class:

 Image image = new Image(); BitmapImage myBitmap = new BitmapImage(new Uri("http://somesite.com/someimage.jpg", UriKind.Absolute)); myBitmap.DownloadProgress += new EventHandler<DownloadProgressEventArgs>(myBitmap_DownloadProgress); image.Source = myBitmap; 
+3
source

All Articles