windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-baseview-b91be063.md
Occurs when the mouse pointer moves over a View.
Namespace : DevExpress.XtraGrid.Views.Base
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[DXCategory("Mouse")]
public event MouseEventHandler MouseMove
<DXCategory("Mouse")>
Public Event MouseMove As MouseEventHandler
The MouseMove event's data class is MouseEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| Button | Gets which mouse button was pressed. |
| Clicks | Gets the number of times the mouse button was pressed and released. |
| Delta | Gets a signed count of the number of detents the mouse wheel has rotated, multiplied by the WHEEL_DELTA constant. A detent is one notch of the mouse wheel. |
| Location | Gets the location of the mouse during the generating mouse event. |
| X | Gets the x-coordinate of the mouse during the generating mouse event. |
| Y | Gets the y-coordinate of the mouse during the generating mouse event. |
When handling the MouseMove event of a detail View, the event sender identifies the clone that has actually raised the event.
You may need to determine which View element is currently located under the mouse pointer. Refer to the Hit Information help topic for information on how this can be performed.
The following code snippets (auto-collected from DevExpress Examples) contain references to the MouseMove event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
view.MouseDown += OnMouseDown;
view.MouseMove += OnMouseMove;
view.TopRowChanged += OnTopRowChanged;
winforms-grid-add-check-box-to-column-header/CS/GridViewColumnHeaderExtender.cs#L257
view.MouseUp -= OnMouseUp;
view.MouseMove -= OnMouseMove;
view.MouseLeave -= view_MouseLeave;
winforms-grid-custom-button-in-column-header/CS/WindowsApplication3/ColumnHeaderExtender.cs#L48
view.MouseUp += OnMouseUp;
view.MouseMove += OnMouseMove;
}
winforms-grid-move-cell-using-drag-drop/CS/Classes/GridViewHelper.cs#L28
this.gridView.MouseDown += new MouseEventHandler(gridView_MouseDown);
this.gridView.MouseMove += new MouseEventHandler(gridView_MouseMove);
this.gridView.MouseUp += new MouseEventHandler(gridView_MouseUp);
winforms-mvvm-drag-drop-rows-between-grids/CS/DragDropHelper/DragAndDropHelper.cs#L43
gridView.OptionsBehavior.Editable = false;
gridView.MouseMove += new System.Windows.Forms.MouseEventHandler(view_MouseMove);
gridView.MouseDown += new System.Windows.Forms.MouseEventHandler(view_MouseDown);
AddHandler view.MouseDown, AddressOf OnMouseDown
AddHandler view.MouseMove, AddressOf OnMouseMove
AddHandler view.TopRowChanged, AddressOf OnTopRowChanged
winforms-grid-add-check-box-to-column-header/VB/GridViewColumnHeaderExtender.vb#L237
RemoveHandler _view.MouseUp, AddressOf OnMouseUp
RemoveHandler _view.MouseMove, AddressOf OnMouseMove
RemoveHandler _view.MouseLeave, AddressOf view_MouseLeave
winforms-grid-custom-button-in-column-header/VB/WindowsApplication3/ColumnHeaderExtender.vb#L48
AddHandler view.MouseUp, AddressOf OnMouseUp
AddHandler view.MouseMove, AddressOf OnMouseMove
End Sub
winforms-grid-move-cell-using-drag-drop/VB/Classes/GridViewHelper.vb#L25
AddHandler gridView.MouseDown, AddressOf gridView_MouseDown
AddHandler gridView.MouseMove, AddressOf gridView_MouseMove
AddHandler gridView.MouseUp, AddressOf gridView_MouseUp
winforms-mvvm-drag-drop-rows-between-grids/VB/DragDropHelper/DragAndDropHelper.vb#L61
gridView.OptionsBehavior.Editable = False
AddHandler gridView.MouseMove, New MouseEventHandler(AddressOf view_MouseMove)
AddHandler gridView.MouseDown, New MouseEventHandler(AddressOf view_MouseDown)
See Also