protected override void OnDockingMenu(object sender, EventArgs e) { if (sender == menuFloatingWindow) { ReferencedPane.ChangeState(PaneState.FloatingWindow); ChangeState(ReferencedPane.State); } if (sender == menuDockedWindow) { ReferencedPane.ChangeState(PaneState.DockableWindow); ChangeState(ReferencedPane.State); } if (sender == menuTabbedDocument || sender == menuClose || sender == menuAutoHide) { foreach (DockableContent content in Contents) { content.SetContainerPane(ReferencedPane); } Close(); _floatingWindow.Close(); } if (sender == menuTabbedDocument) { ReferencedPane.TabbedDocument(); } if (sender == menuClose) { ReferencedPane.Close(); } if (sender == menuAutoHide) { ReferencedPane.Show(); ReferencedPane.AutoHide(); } }
protected virtual void DragContent(DockableContent contentToDrag, Point startDragPoint, Point offset) { Remove(contentToDrag); DockablePane pane = new DockablePane(DockManager); //pane = new DockablePane(); //pane.DockManager = DockManager; pane.Add(contentToDrag); pane.Show(); DockManager.Add(pane); //DockManager.Add(contentToDrag); FloatingWindow wnd = new FloatingWindow(pane); pane.ChangeState(PaneState.DockableWindow); DockManager.Drag(wnd, startDragPoint, offset); }