BusyIndicators's BusyContent appears too late

3 posts, 0 answers
  1. Peter
    Peter avatar
    37 posts
    Member since:
    Dec 2011

    Posted 11 Apr 2012 Link to this post

    I'm experiencing a strange behavior: The RadBusyIndicators's content (the yellow circle and the text "Loading...") appears far too late, but the BusyIndicator becomes grey at the right moment. The content (progress bar) appears not until the time-consuming action is over.

    Here is what I'm doing in Pseudocode:

    MyDialog dialog = new Dialog();             // A Window that contains the BusyIndicator
    dialog.myRadBusyIndicator.IsBusy = true;    // Startup with the BusyIndicator activated
    dialog.Dispatcher.BeginInvoke(new System.Action(MyLoginAction));   // Start some time-consuming action in the Background
    dialog.ShowDialog();                        // Show the user a Dialog with busy information

    Problem: The yellow circle in the BusyIndicator shows up AFTER the time-consuming action is over, but Busy-State (graying) is activated correctly when the Dialog pops up.

    Some intricate threading problem?

  2. Ivo
    Ivo avatar
    390 posts

    Posted 17 Apr 2012 Link to this post

    Hi Peter,

    The code executed into a Dispatcher.BeginInvoke always run on the UI thread. You will have to execute the time-consuming code into a BackgroundWorker to avoid this. You can find a sample example attached.

    Kind regards, Ivo
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Peter
    Peter avatar
    37 posts
    Member since:
    Dec 2011

    Posted 17 Apr 2012 Link to this post

    Thanks a lot, Ivo!

    That was the solution to my problem. Great support! 

    The lesson learned (for me and others) is:

    When using the RadBusyIndicator, you should always run the time-consuming code in a BackgroundWorker or in a separate thread - even if UI Dispatcher.BeginInvoke seems to work at first sight...

Back to Top