DockNotebook Insert (SdiWorkspaceWindow window, Action<DockNotebookContainer> callback) { var newNotebook = new SdiDragNotebook ((DefaultWorkbench)IdeApp.Workbench.RootWindow); newNotebook.NavigationButtonsVisible = false; newNotebook.InitSize (); var newContainer = new DockNotebookContainer (newNotebook); newNotebook.PageRemoved += HandlePageRemoved; if (window != null) { var newTab = newNotebook.AddTab (window); window.SetDockNotebook (newNotebook, newTab); } Remove (Child); callback (newContainer); tabControl.InitSize (); ShowAll (); return newNotebook; }
public static DockWindow MoveToFloatingWindow (SdiWorkspaceWindow workspaceWindow, int x, int y, int width, int height) { var window = new DockWindow (); var notebook = window.Container.GetFirstNotebook (); var tab = notebook.AddTab (); tab.Content = workspaceWindow; window.Title = DefaultWorkbench.GetTitle (workspaceWindow); workspaceWindow.SetDockNotebook (notebook, tab); window.Move (x, y); window.Resize (width, height); window.ShowAll (); return window; }