Asynchronous Image Loading in Silverlight
Posted by: HackingSilverlight,
on 04 Jan 2010 |
View original | Bookmarked: 0 time(s)
So one task that was bugging me today was doing image loading asynchronously so as to not drag the app down. Now there are some 'xaml' ways of doing this in wpf and supposedly in SL but alas I have not seem it work well. I'm working on a larger class that does this better but here is the basics of how I got it to work in C# code... to start with lets take a look at the following code:WebClient client = new WebClient();client.OpenReadCompleted += new OpenReadCompletedEventHandler(wc_OpenReadCompleted);if...