Warning boring tech related blog entry follows:
The trick (hack) is the following
1) You need a System.IntPtr containing a pointer to the windows handle (this.Handle if you are lucky enough to be in a System.Windows.Window.Form)
2) You need to feed this pointer into your dialog thusly:
WindowInteropHelper wih = new WindowInteropHelper(myUserControl);
wuh.Owner = myIntPtr;
// then, with magical flair:
myUserControl.ShowDialog();
No comments:
Post a Comment