How to show Silverlight Toolkit Busy Indicator during calculation? -



How to show Silverlight Toolkit Busy Indicator during calculation? -

i'm having problems implementing command shows busy indicator, here scenario: have simple view busy indicator , textblock, bind viewmodel (that following).

public class viewmodel { private bool _isbusy; public bool isbusy { { homecoming _isbusy; } set { _isbusy=value; onpropertychanged("isbusy"); } } private string _text; public string text { { homecoming _text; } set { _text = value; onpropertychanged("text"); } } public void callme() { isbusy = true; text = static.performcalculation(); isbusy = false; } }

so far pretty simple, no?? problem when have method callme(). have show , hide busy indicator while calculation beingness done, thougth reason calculations , isbusy property notifications done on same thread, came out this:

public void callme() { isbusy = true; static.performcalculationasync(calculationcallback); } private void calculationcallback(string result) { text = result; isbusy = false; }

now different happen, busy indicator loads fine, when calculation short busyindicator isn't shown , there little delay between callme() method called , text appears on screen. this problem, want text property gets calculated (and shown on screen) before busyindicator gets hidden.

does know way this, or has advice can follow??

the busyindicator command needs

displayafter="0"

silverlight silverlight-toolkit busyindicator

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -