Search code examples
c#wpfwindowswinapitopmost

Window oppened after double click on progress bar is immidiatly dragged into background


I've got a non-dialog window, which opens after the user double-clicks on a progress bar.

Each time it opens, it's briefly in the foreground, after which it is dragged into background (hidden behind the main application window, the one with the progress bar).

I want for it to remain the top window, and I don't want to make it Topmost.

How do I do this?

I'm writing this in WPF 4 and c#


Solution

  • Set the window's Owner to be the main window.