I have a WPF and an enter button on it, when i click enter, a new WPF is opened. But it is behind first WPF, so i used this,
but VS says "does not contain the definition"
How can i Bring that window to front.
To me the question is not "How do I bring it to the front" but why did it not come to the front automatically?
The only situation in which I have seen a dialog not come to the front was when the creating window was
TopMost and the dialog's
Owner property had not been set.
Owner should force the dialog to the front.
mw2.Activate(); will attempt to bring the window to the front and focus on it.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)