private void treeViewChannel_QueryContinueDrag(object sender, QueryContinueDragEventArgs e) { if (e.EscapePressed) { // Reset the drag rectangle when the mouse button is raised. this.dragBoxFromMouseDown = Rectangle.Empty; e.Action = DragAction.Cancel; } }