I came across a problem while developing an application.
On click of a button I need to download some data from a remote server using web service. Once I start downloading data, I was required to show loader animation on the screen. Because the data I was downloading were huge, the application was getting stuck. With this situation the loader animation was not getting displayed on the screen. In such scenario, user has no clue about what happened with the application. The reason for this was the huge data being downloaded from the application and all these was performed in single thread.
I want loader animation to keep displaying in such scenarios। To achieve this I created a new thread which downloads data from the remote server. So even if there is some additional pain to one thread, it does not make other thread down. So with loader animation and data download happened in separate threads, both the operations remains intact. With this approach I can display loader animation without getting affected by the other thread which is downloading data from remote server.
Download Sample Code from here: http://cid-cd9cdbf38105503c.skydrive.live.com/self.aspx/Blog%20Posts/WpfMultiThread.zip
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment