
January 28, 2010 09:47 by
Brian Keating |
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);
About Brian Keating
Professional Software Developer, .NET / C++ / Java View all posts by
Brian Keating →