This is a migrated thread and some comments may be shown as answers.

Manually turning on and off busy indicator

0 Answers 151 Views
BusyIndicator
This is a migrated thread and some comments may be shown as answers.
Mateusz
Top achievements
Rank 1
Mateusz asked on 05 Jan 2018, 03:43 PM

Hello,

I'm trying to use busy indicator. What I've done is declaring it as static field for in my App class. I can call and change it from wherever I want, the thing is, I do not know how to call it correctly. My intuition told me to do something like this:

 

  private void ListaKlientow(object sender, MouseButtonEventArgs e) // My TreeView item clicked
        {
            App.BusyIndicator.IsBusy = true; //Set indicator to true
 
// Creating new RadTabItem and populating it with Data
                _nazwakarty = "Klienci - Lista";
                KlienciLista strona = new KlienciLista();
                AddItem(strona, _nazwakarty);
            
        }

 

And in new page constructor I'm calling App.BusyIndicator.IsBusy = false.

The problem is, that Indicator is awaiting Page to load and showing exaclty on the same time as page does. I want it to render and show before my page loads. Technicly and intuitively it should work as intended, but I guess there is some render-related issue here, so window doesn't want to show indicator before all stuff is rendered. The thing is, I want to keep indicator as simple as possible, without so much code and preferably without XAML styling and overriding anything. How can I do it in the way I want? Is it possible?

 

Thanks in advance

No answers yet. Maybe you can help?

Tags
BusyIndicator
Asked by
Mateusz
Top achievements
Rank 1
Share this question
or