Supposedly ShowDialog () is a modal window, should be above the main window, but open the other application window and then switch back, found that the child window is missing, the main window can not be manipulated.
In addition, the child window is set to not appear on the taskbar and can only be switched to child windows via Alt-tab.
I looked for a long time to find a solution, in fact, it is very simple, is to set the owner of the child window in the parent window.
I wrote it in the constructor of the child window:
This. Owner = Application.Current.MainWindow;
The reference links are as follows:
Http://www.telerik.com/community/forums/wpf/window/modal-window-not-on-top.aspx
This article from clark803 's blog, the original address: http://blog.csdn.net/clark803/article/details/7348988
Wpf:showdialog () switch to another application window, and then switch back to make the child window always at the top