Exemple #1
0
        //protected override void OnClosed(EventArgs e)
        //{
        //    base.OnClosed(e);

        //    DockableContent[] cntsToClose = new DockableContent[HostedPane.Items.Count];
        //    HostedPane.Items.CopyTo(cntsToClose, 0);

        //    foreach (DockableContent cntToClose in cntsToClose)
        //    {
        //        //HostedPane.CloseOrHide(HostedPane.Items[0] as DockableContent, ForcedClosing);
        //        cntToClose.CloseOrHide(ForcedClosing);
        //    }

        //    Manager.UnregisterFloatingWindow(this);
        //}

        public override Pane ClonePane()
        {
            DockablePane paneToAnchor = new DockablePane();

            ResizingPanel.SetEffectiveSize(paneToAnchor, new Size(Width, Height));

            //if (HostedPane.Style != null)
            //    paneToAnchor.Style = HostedPane.Style;

            int selectedIndex = HostedPane.SelectedIndex;

            //transfer contents from hosted pane in the floating window and
            //the new created dockable pane
            while (HostedPane.Items.Count > 0)
            {
                paneToAnchor.Items.Add(
                    HostedPane.RemoveContent(0));
            }

            paneToAnchor.SelectedIndex = selectedIndex;

            return(paneToAnchor);
        }
 internal FloatingDockablePane(DockableFloatingWindow floatingWindow, DockablePane paneToTransfer)
 {
     _floatingWindow = floatingWindow;
     _paneToTransfer = paneToTransfer;
 }