I created a custom MessageWindow
in order to get rid of the old one and put my own style on it...
My problem is when I for example click a button to ope
You shouldn't create a new thread for the other window. When using WPF, all UI should run on the same thread.
Create new threads when you want to do something that is unrelated to UI and don't want to block the UI.
If you want to prevent the user from interacting with the main window while a MessageWindow
is visible, simply set the Owner
of the MessageWindow
to your application's main window. Then call ShowDialog()
from the UI thread, and the behavior should be comparable to if you called MessageBox.Show()
.
Do not use a separate thread or attempt to manually block the message pump.