private static DockState Save(IDockFloatWindow p)
 {
     return(new FloatWindowSave()
     {
         Position = p.Window.Location,
         Size = p.Window.Size,
         Content = DockState.Save(p.DockPanel.Current)
     });
 }
Exemple #2
0
        internal static void StartDrag(IDockFloatWindow floatform, Point position)
        {
            floatform.Window.Visible = false;
            DragWindow dragwin = CreateDragWin(floatform.DockPanel.xwt, position, floatform.DockPanel.Current.WidgetSize);

            //  floatform.DockPanel.xwt.QueueOnUI(() => {
            dragwin.Show(floatform.MainDockPanel, (result, droppane, drophit, pt) =>
            {
                if (result && droppane != null && drophit.HasValue)
                {
                    floatform.DockPanel.DockFloatform(floatform, droppane, drophit.Value);
                }
                else if (result)
                {
                    (floatform.Window.GetBackend() as IWindowFrameBackend).Bounds = new Rectangle(pt, (floatform.Window.GetBackend() as IWindowFrameBackend).Bounds.Size);
                    floatform.Window.Visible = true;
                }
                dragwin.Dispose();
            });
            //    });
        }