i am wondering if there are any drawbacks, in showing a modal mainwindow in a WPF application with .ShowDialog() instead of Show().
This is the usual way to manually show the mainwindow:
private void Application_Startup(object sender, StartupEventArgs e)
{
// the usual way to show the mainwindow
new MainWindow().Show();
}
This is what i want do to:
private void Application_Startup(object sender, StartupEventArgs e)
{
// what i want to do
new MainWindow().ShowDialog();
}
I want to start a WPF app from a 3. party application addon, that can call static methods from external .NET DLLs. So i build a DLL as an addon that starts my WPF app inside a new AppDomain. This works fine as long the user does not do anything in the 3. party app, otherwise it will crash. I can prevent this, if i show the mainwindow of my app as a modal dialog, because this blocks the 3. party app window.