We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Problems with updating the BusyIndicator

I want to run the BusyIndicator after a ButtonClick.
Afterwards, the data are readed and the BusyIndicator is to be switched off after the complete reading.
In the meantime, no user action may be allowed.

But the BusyIndicator is not displayed. I try it with and without Dispatcher.
With async/await user Actions are allowed in the meantime what i not want

        private void Button_Click(object sender, RoutedEventArgs e)
        {
                this.Dispatcher.BeginInvoke((Action)(() =>
                {
                    this.BusyIndicator.IsBusy = true;
                }));
                List<Result> result = HCHelper.Read();
                this.Dispatcher.BeginInvoke((Action)(() =>
                {
                    this.BusyIndicator.IsBusy = false;
                }));
}

Can you help me...

3 Replies

AK Ashok Kumar Murugesan Syncfusion Team January 18, 2017 07:05 PM UTC

Hi Andreas Mazatis,

Thank you for contacting Syncfusion support.

We have prepared the sample which tries to meet your requirement. In this sample we have used button click event in this event we have set “IsBusy” property to true and then we have used time tick event where we have set the “IsBusy” property to false after getting the data . Please download the sample from the following location.

Sample link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/Busyindicatorsample-1996977145.zip 

Please let us know if you need further assistance.

Regards,
Ashok Kumar M. 



AN AndyM January 19, 2017 06:18 PM UTC

Unfortunately it does not work as I wanted:
-The BusyIndicator runs for 3 seconds and then freezes
-After the function call (Reading and parsing 2000 files from filesystem into a structure) - the BusyIndicator hides,


VR Vijayalakshmi Roopkumar Syncfusion Team January 20, 2017 04:28 PM UTC

Hi Andreas, 
Query 1: The BusyIndicator runs for 3 seconds and then freezes 

From your update, we come to know that you want to display the busy indicator for long time. To display the busy indicator for long time, you can set it using the following code. 
Code Snippet [C#] 
//To display the BusyIndicator for Long time
 
timer.Interval = new TimeSpan(0,0,0,0,3500); 

 
  
Query 2:  After the function call (Reading and parsing 2000 files from filesystem into a structure) - the BusyIndicator hides, 
After we have added the items in the listbox , we have hide the BusyIndicator by setting the property IsBusy to false. 
Code Snippet [C#] 
//To hide the BusyIndicator 
 busycontrol.IsBusy = false; 
  

If our understanding on your requirement is different, then please brief about your requirement clearly by providing screenshot or video. It would be helpful for us to proceed further on this.

Regards,
Vijayalakshmi V.R. 


Loader.
Live Chat Icon For mobile
Up arrow icon