views:

72

answers:

1

I have a Silverlight 4 app using Prism 2.2 and I have a few modules that I am loading on demand by defining them as ondemand in the module catalog (via a xaml file) and then using the ModuleManager to request the module be downloaded

Is there a mechanism in Prism to determine when the module download is completed and get to download progress events?

There was a thread on the prism codeplex site but none of the suggestions seemed to pan out for the folks having the discussion

http://compositewpf.codeplex.com/Thread/View.aspx?ThreadId=47957

thanks Michael

A: 

It turns out that the solution provided in the prism discussion on codeplex worked like a charm

http://compositewpf.codeplex.com/Thread/View.aspx?ThreadId=47957

I created a custom FileDownloader called FileDownloaderWithProgress.

I wanted to subclass the existing one in Prism but the WebClient that fires the DownloadProgressChanged event was private. So I had to create my own by implementing IFileDownloader.

In the DownloadProgressChanged event handler in the FileDownloaderWithProgress class- I publish a Prism event that includes the % complete and the module name that was downloaded.

MIantosca