Beispiel #1
0
 /// <summary>
 /// Handles mousemove event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void OnMouseMove(object sender, MouseEventArgs e)
 {
     if (IsMouseCaptured)
     {
         DragPaneServices.MoveDrag(PointToScreen(e.GetPosition(this)));
     }
 }
Beispiel #2
0
        public DockManager()
        {
            InitializeComponent();

            DragPaneServices.Register(this);

            _overlayWindow = new OverlayWindow(this);

            gridDocking.AttachDockManager(this);
            gridDocking.DocumentsPane.Show();// .DockManager = this;
        }
Beispiel #3
0
        /// <summary>
        /// Begins dragging operations
        /// </summary>
        /// <param name="floatingWindow">Floating window containing pane which is dragged by user</param>
        /// <param name="point">Current mouse position</param>
        /// <param name="offset">Offset to be use to set floating window screen position</param>
        /// <returns>Retruns True is drag is completed, false otherwise</returns>
        public bool Drag(FloatingWindow floatingWindow, Point point, Point offset)
        {
            if (!IsMouseCaptured)
            {
                if (CaptureMouse())
                {
                    floatingWindow.Owner = ParentWindow;
                    DragPaneServices.StartDrag(floatingWindow, point, offset);

                    return true;
                }
            }

            return false;
        }