This project is read-only.

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:



                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 9:44 AM
I just forward the download progress event from the WebClient, it is
normal that this is invoked several times.