Guest User

Untitled

a guest
Jan 18th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. // WPF
  2. var view = new MainView();
  3.  
  4. // Get the handle to the non-WPF owner window
  5. var ownerWindowHandle = Mastercam.Support.UI.MastercamWindow.GetHandle().Handle;
  6.  
  7. // Set the owned WPF window’s Owner property with the non-WPF owner window
  8.  
  9. var helper = new System.Windows.Interop.WindowInteropHelper(view) { Owner = ownerWindowHandle };
  10. view.Show();
  11.  
  12.  
  13. // WinForms
  14. var winView = new TestView() { TopLevel = true} ;
  15. winView.Show(Mastercam.Support.UI.MastercamWindow.GetHandle());
Add Comment
Please, Sign In to add comment