I have created a small window with some style. Now i want to use it as exactly like a MessageBox. How can i achieve it?
Edit: I am new to WPF. I tried calling it in the main window like this.
Window1 messageBox = new Window1();
messageBox.Show();
messageBox.Activate();
The problem is the newly generated window disappears just behind main window without letting me to click on the action button in it.
Use
ShowDialoginstead ofShowmethod to popup the messagebox window. In this way user will hve to first close the popup or message box window before moving back to main windowEdit
You obviously would like to have result back in the main windows right? you can do it in several ways. One simplest way could be to expose a public method in MainWindow
Create a constructor of MessageWindow that take MainWindow in parameter