If I understand your question correctly, you can achieve what you want using something like this:
class Win32Window : IWin32Window { IntPtr handle; public Win32Window(IntPtr handle) { this.handle = handle; } public IntPtr Handle { get { return this.handle; } } } static void Main() { IntPtr targetParent =
This will turn MainForm child window of the specified window, which will always be displayed above it. I am using ShowDialog in the example, but this should also work for Show . This is typical of Windows Forms.
In WPF, you can try the following:
var helper = new WindowInteropHelper(); helper.Owner =
I quickly tried this after showing the WPF window and it seemed to work as expected, but WPF knowledge is not so great.
source share