Busy indicator for WCF async calls in Silverlight 4?
I have a SL4 app consuming WCF services. The client make async call to the services, during this time I would like to show some sort information or busy indicator on the screen which tells the users that the app is doing something开发者_C百科.
Now I am pretty sure SL4 has something like this, but I am drawing a blank....
Can someone please point me to the right direction?
Maybe you are looking for the BusyIndicator control which is part of the Silverlight Toolkit Experimental quality band.
You can try the control on the following link: http://www.silverlight.net/content/samples/sl4/toolkitcontrolsamples/run/default.htmlYou need an animation storyboard and then use code like this:
wcfProxyClass.DoMethodAsync()
loadingStoryboard.Begin();
Then in the Completed event handler
loadingStoryboard.End(); // not sure on this syntax
Here's a great article that should get you started. -- http://chrisa.wordpress.com/2008/10/09/a-wait-indicator-in-silverlight/
精彩评论