I have a delay before the object appears and even sometimes it does not appear.
I try
DisplayAfter="0"
And I use
xabiMain.IsBusy = true;
and
xabiMain.IsBusy = false;
To start and end.
Does it have another function to make it appear immediately?
Francois.
Hello Francois,
Calling System.Threading.Thread.Sleep in the Button Click event, which is invoked by the UI thread, results in messages not being processed during that time.
You can use BackgroundWorker or Tasks to perform the delay.
I’ve attached a modified sample demonstrating this.
Hi Svetla,
If you add
System.Threading.Thread.Sleep(5000);
after BusyIndicator.IsBusy = true;
the busy indicator appear after 5 seconds.
Is appear at the end of the event fonction.
Is it possible to make it appear as soon as the function "BusyIndicator.IsBusy = true;" is called ?
My real function is
private void BtnSave_Click(object sender, RoutedEventArgs e) { xabiMain.IsBusy = true; if (Save()) { if (SendByEmail()) NewInvoice(); } xabiMain.IsBusy = false; }
Thank you.
I followed the steps you suggested and was unable to reproduce the behavior you're describing.
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using version 16.2.20162.2109.
If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Please let me know if I can provide any further assistance.