28
Sep

Checking Image Download Progress

Post a comment » Popularity: 1%

This application demonstrated how we may check the download progress of an image. The progress is visualized with a Progress Bar.

Checking Image Download Progress

View Demo: New Window
Check the download progress:
// C#
BitmapImage bitmapImage = new BitmapImage();
bitmapImage.DownloadProgress += new EventHandler<downloadprogresseventargs>(bitmapImage_DownloadProgress);
bitmapImage.UriSource = new Uri(URL, UriKind.Absolute);
Image newImage = new Image() { Source = _bitmapImage };  

void bitmapImage_DownloadProgress(object sender, DownloadProgressEventArgs e)
{
    int progress = e.Progress; // 0 = 100  

    if (e.Progress == 100)
    {
        // finish
    }
}
  • DZone
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit

Related Posts

Leave a Reply