DownloadProgress being fired more than once for image download

Mar 22, 2011 at 5:33 AM

 


For some reason I am seeing the DownloadProgress event being fired more than once in the below code. Is that expected? This happened for number of urls jpegs, gifs etc.. e.g: http://failblog.files.wordpress.com/2011/03/878ea098-0581-4d05-bcf9-5219b9707bed.jpg

 

 

                ExtendedImage img = new ExtendedImage();
                img.UriSource = new Uri(imgUrl, UriKind.RelativeOrAbsolute);
                img.DownloadProgress += new DownloadProgressChangedEventHandler(img_DownloadProgress);                  
img.LoadingFailed += new EventHandler<UnhandledExceptionEventArgs>(img_LoadingFailed); img.LoadingCompleted += new EventHandler(img_LoadingCompleted);

 

 

Call stack for both look the same.

Coordinator
Mar 22, 2011 at 9:44 AM
I just forward the download progress event from the WebClient, it is
normal that this is invoked several times.