Does MEF block UI thread in Silverlight?

May 3, 2011 at 6:48 AM

Hi guys,

I use MEF in my SL app. I download multiple xap files using DeploymentCatalog.

I am trying to update UI in DownloadCompleted event handler. However, UI won’t update until last file is loaded. It takes up to 10 seconds to download all parts (even when xap files are cached by browser) and application remains unresponsive. 

Please advise

May 3, 2011 at 7:04 AM
DownloadCompleted is the wrong event. There is an update progress event you should use.
May 3, 2011 at 10:59 PM
Edited May 3, 2011 at 11:03 PM

Hi mate,

Thank you for your suggestion. I tried to use DownloadProgressChanged instead. Unfortunatelly, UI thread remains blocked.

I also noticed that DownloadProgressChanged gets called twice for each xap file with e.ProgressPercentage = 100 and e.BytesReceived = e.TotalBytesToReceive. I use IE 9 if that matters.

Please advise