Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to show Silverlight Toolkit Busy Indicator during calculation?
    primarykey
    data
    text
    <p>I'm having some problems implementing a control that shows a Busy indicator, here is the scenario: I have a simple View with a busy indicator and a TextBlock, this bind to a ViewModel (that is something like the following).</p> <pre><code>public class ViewModel { private bool _isbusy; public bool IsBusy { get { return _isbusy; } set { _isbusy=value; OnPropertyChanged("IsBusy"); } } private string _text; public string Text { get { return _text; } set { _text = value; OnPropertyChanged("Text"); } } public void CallMe() { IsBusy = true; Text = Static.PerformCalculation(); IsBusy = false; } } </code></pre> <p>So far all pretty simple, no?? The problem is when i have a method like CallMe(). I have to show and hide the busy indicator while the calculation is being done, i thougth that the reason was that the calculations and the IsBusy property notifications where done on the same thread, so i came out with something like this:</p> <pre><code>public void CallMe() { IsBusy = true; Static.PerformCalculationAsync(CalculationCallback); } private void CalculationCallback(string result) { Text = result; IsBusy = false; } </code></pre> <p>Now something different happen, the Busy Indicator loads fine, but when the calculation is too short the BusyIndicator isn't shown and there is a small delay between the CallMe() method called and the Text appears on the screen. <em>This is my problem, i want that the Text property gets calculated (and shown on the screen) before the BusyIndicator gets hidden.</em></p> <p><strong>Does anyone know a good way to do this, or has any advice that i can follow??</strong></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload