Use the following method to set the owner of a
System.Windows.Window
to a
System.Windows.Forms.Form
:
public static void setOwner(System.Windows.Forms.Form ownerForm, System.Windows.Window window)
{
WindowInteropHelper helper = new WindowInteropHelper(window);
helper.Owner = ownerForm.Handle;
}
It might be useful when you are developing an application where you are using WinForms and WPF windows together.
Note: The window will appear always in front of its owner, I use this to display tips, for example.