BKStart a conversation ↗

Extension Method for WPF Window with Forms Owner

Extension Method

internal static class InteropExtensions
{
    public static bool? ShowDialog(this System.Windows.Window win, IntPtr handle)
    {
        WindowInteropHelper helper = new WindowInteropHelper(win);
        helper.Owner = handle;
        return win.ShowDialog();
    }
}

Usage

var win = new WpfWindow();
win.ShowDalog(windowsFormOwnerHandle);