DownloadProgress being fired more than once for image download

Mar 22, 2011 at 4: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:



                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.

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