I just did what Dave suggested and it worked out great! Mine was for PDF creation. When the user clicks a button to create the PDF, I show the Dialog with an infinite progress bar, create the PDF, close the Dialog, then show the PDF. I'm used to thinking and working synchronously, but this concept is asynchronous.
- Create a Dialog with an IsRunning and IsDone boolean properties both defaulted to No.
- Add a Button to the Dialog that sets IsRunning to true, disables the Button, and starts your process on Clicked.
- Add a 20 sec Single Timer to the Dialog that sets isRunning to true, disables the Button, and starts your process if IsRunning is False
- Add a 1 sec Multiple Timer to close the Dialog when IsDone is True.
- When the process is done, set IsDone to True.