Silverlight Background Thread using WebClient
I'm using a WebClient to get infos asynchronously from my web service :
wc.DownloadStringCompleted += DownloadStringCompleted; wc.DownloadStringAsync(service);
I works fine, but I think the DownloadStringCompleted method is working on the UI Thread, and since i'm doing a lot of parsing there, my page takes a few seconds to appear. However, since I have so fixed data and a progress bar, I would'nt mind have it appearing instantly.
How could I perfom this ?
Use HttpWebRequest rather than WebClient. HWR doesn't return on the UI thread and so doesn't block it from updating.