Reputation: 887
I have a long running task in my WP app. MessageDialog
must be opened before the task starts and when the task ends then MessageDialog
must be automatically closed programmatically from the code. How can I achieve such behavior?
I've tried to use solution from some similar questions (first, second):
MessageDialog dialog = new MessageDialog("test");
IAsyncInfo asyncInfo = dialog.ShowAsync();
await SomeTask();
asyncInfo.Cancel();
But this didn't help me. Message dialog remains opened.
Upvotes: 1
Views: 427
Reputation: 887
So I've found a solution in another question:
How to dismiss a MessageDialog from code in Windows Phone 8.1
Short answer:
MessageDialog
programmatically on Windows Phone.ContentDialog
instead if you need such behavior.Upvotes: 2