How do I use Dialogs synchronously - MahApps/MahApps.Metro GitHub Wiki
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.
External dialogs
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.