public void OpenEditor(IntPtr parentWindow) { HostInfo.SendEvent(DeviceId, new Event() { Data = null, EventIndex = 0, Type = EventType.WindowSize }); window = new ScriptWindow(); window.ViewInstance.DataContext = ViewModel; ViewModel.CurrentDispatcher = window.Dispatcher; //window.Topmost = true; //var handle = new WindowInteropHelper(window).Handle; //SetParent(handle, parentWindow); window.Topmost = true; window.ShowInTaskbar = false; window.Show(); //SharpSoundDevice.DeviceUtilities.DockWpfWindow(window, parentWindow); }