-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
How do I use Dialogs synchronously
Jan Karger edited this page May 2, 2019
·
1 revision
The short answer is you can't, unless you use ShowModalDialogExternally
.
The long answer is because internal dialogs (dialogs shown inside of a MetroWindow
) are not real dialogs. They are controls shown on top of your MetroWindow
's content. That means that it requires that the UI thread/dispatcher be available to work, just like your controls do.
We use internal dialogs asynchronously so that you can wait for a response from the dialog and keep the UI available for other potential user interactions.
The reason that external dialogs can be used synchronously is because since the dialog has it's own "window", it has its own UI thread that can wait for user input.
Full MahApps documentation is available at https://mahapps.com