/// <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))); } }
public DockManager() { InitializeComponent(); DragPaneServices.Register(this); _overlayWindow = new OverlayWindow(this); gridDocking.AttachDockManager(this); gridDocking.DocumentsPane.Show();// .DockManager = this; }
/// <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; }