Back to Devexpress

BaseView.MouseMove Event

windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-baseview-b91be063.md

latest8.3 KB
Original Source

BaseView.MouseMove Event

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

Declaration

csharp
[DXCategory("Mouse")]
public event MouseEventHandler MouseMove
vb
<DXCategory("Mouse")>
Public Event MouseMove As MouseEventHandler

Event Data

The MouseMove event's data class is MouseEventArgs. The following properties provide information specific to this event:

PropertyDescription
ButtonGets which mouse button was pressed.
ClicksGets the number of times the mouse button was pressed and released.
DeltaGets 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.
LocationGets the location of the mouse during the generating mouse event.
XGets the x-coordinate of the mouse during the generating mouse event.
YGets the y-coordinate of the mouse during the generating mouse event.

Remarks

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.

winforms-grid-enable-editing-in-group-row-to-change-cell-values/CS/WindowsApplication3/GroupEditProvider.cs#L75

csharp
view.MouseDown += OnMouseDown;
view.MouseMove += OnMouseMove;
view.TopRowChanged += OnTopRowChanged;

winforms-grid-add-check-box-to-column-header/CS/GridViewColumnHeaderExtender.cs#L257

csharp
view.MouseUp -= OnMouseUp;
view.MouseMove -= OnMouseMove;
view.MouseLeave -= view_MouseLeave;

winforms-grid-custom-button-in-column-header/CS/WindowsApplication3/ColumnHeaderExtender.cs#L48

csharp
view.MouseUp += OnMouseUp;
    view.MouseMove += OnMouseMove;
}

winforms-grid-move-cell-using-drag-drop/CS/Classes/GridViewHelper.cs#L28

csharp
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

csharp
gridView.OptionsBehavior.Editable = false;
gridView.MouseMove += new System.Windows.Forms.MouseEventHandler(view_MouseMove);
gridView.MouseDown += new System.Windows.Forms.MouseEventHandler(view_MouseDown);

winforms-grid-enable-editing-in-group-row-to-change-cell-values/VB/WindowsApplication3/GroupEditProvider.vb#L78

vb
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

vb
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

vb
AddHandler view.MouseUp, AddressOf OnMouseUp
    AddHandler view.MouseMove, AddressOf OnMouseMove
End Sub

winforms-grid-move-cell-using-drag-drop/VB/Classes/GridViewHelper.vb#L25

vb
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

vb
gridView.OptionsBehavior.Editable = False
AddHandler gridView.MouseMove, New MouseEventHandler(AddressOf view_MouseMove)
AddHandler gridView.MouseDown, New MouseEventHandler(AddressOf view_MouseDown)

See Also

MouseDown

MouseUp

MouseWheel

BandedGridView.CalcHitInfo*

CardView.CalcHitInfo*

GridView.CalcHitInfo*

BaseView Class

BaseView Members

DevExpress.XtraGrid.Views.Base Namespace