/// <summary> /// Starts drag-and-drop auto-scroll in the Down direction. /// </summary> private void StartDragDropAutoScrollDown() { // Initialize drag-and-drop auto-scroll. InitializeDragDropAutoScroll(); // Set the drag-and-drop auto-scroll mode. dragDropAutoScrollMode = DragDropAutoScrollMode.Down; // Set the drag-and-drop auto-scroll rectangle. dragDropAutoScrollRectangle = BottomDragDropAutoScrollRectangle; // Raise the DragDropAutoScrollBegin event. OnDragDropAutoScrollBegin(EventArgs.Empty); // Start the drag-and-drop auto-scroll timer. dragDropAutoScrollTimer.Start(); }
/// <summary> /// Stops drag-and-drop auto-scroll. /// </summary> private void StopDragDropAutoScroll() { if (dragDropAutoScrollMode != DragDropAutoScrollMode.Off) { // Stop the drag-and-drop auto-scroll timer. dragDropAutoScrollTimer.Stop(); // Set the drag-and-drop auto-scroll mode to Off. dragDropAutoScrollMode = DragDropAutoScrollMode.Off; // Raise the DragDropAutoScrollEnd event. OnDragDropAutoScrollEnd(EventArgs.Empty); } }
/// <summary> /// Starts drag-and-drop auto-scroll in the Up direction. /// </summary> private void StartDragDropAutoScrollUp() { // Initialize drag-and-drop auto-scroll. InitializeDragDropAutoScroll(); // Set the drag-and-drop auto-scroll mode. dragDropAutoScrollMode = DragDropAutoScrollMode.Up; // Set the drag-and-drop auto-scroll rectangle. dragDropAutoScrollRectangle = TopDragDropAutoScrollRectangle; // Start the drag-and-drop auto-scroll timer. dragDropAutoScrollTimer.Start(); }