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 ?

Thanks !

Answers


Use HttpWebRequest rather than WebClient. HWR doesn't return on the UI thread and so doesn't block it from updating.


Need Your Help

Rails 3 + jQuery Mobile Themeroller = Invalid CSS

ruby-on-rails jquery-mobile themeroller

Using a custom jQuery Mobile theme created via Themeroller works fine with Rails for local development. However, running:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.