Home > Mobile >  How to Activate MainWindow in wpf application?
How to Activate MainWindow in wpf application?

Time:08-06

I have a WPF application with a MainWindow and a couple of Dialogs that appear over MainWindow. I want my main window to be activated and appear on top of all dialogs when its clicked. I have tried method Activate() but its not working ,also tried Topmost which is also not working ? Please suggest a solution.

CodePudding user response:

I suppose you are using ShowDialog() to open the other dialogs. Try using Show() when opening new dialogs as that won't force you to close them before being able to access the MainWindow. Of course without a bit more information on your code it's impossible to know exactly what causes the problem.

  • Related