void CtrlDef_OnExecute(NameValueMap Context) { wpfWindow = new PluginWindow(m_inventorApplication, "{880b4435-f9c2-4c5e-b234-d543a20b5c36}"); // Could be a good idea to set the owner for this window // especially if it was modeless as mentioned in this article: var helper = new WindowInteropHelper(wpfWindow); helper.EnsureHandle(); //helper.Owner = new IntPtr(m_inventorApplication.MainFrameHWND); //wpfWindow.Show(); var uimanager = m_inventorApplication.UserInterfaceManager; //Create window if missing if (myDockableWindow == null) { myDockableWindow = uimanager.DockableWindows.Add("{880b4435-f9c2-4c5e-b234-d543a20b5c36}", "URDF", "URDF converter"); } if (!myDockableWindow.IsCustomized) { myDockableWindow.DockingState = DockingStateEnum.kFloat; myDockableWindow.Move(0, 0, myDockableWindow.Height, myDockableWindow.Width); } myDockableWindow.AddChild(helper.Handle); wpfWindow.Show(); myDockableWindow.Visible = true; //wpfWindow.Show(); }