Event arguments for cell-based events of a Grid triggered by the mouse.
Constructors
GridCellMouseEventArgs
#public GridCellMouseEventArgs(GridColumn gridColumn, int row, int column, object item, MouseButtons buttons, Keys modifiers, PointF location, SizeF? delta = null, float pressure = 1)
Initializes a new instance of the GridCellMouseEventArgs class.
Parameters:
| gridColumn (GridColumn) | Grid column that triggered the event. |
| row (int) | The row that triggered the event, or -1 if no row. |
| column (int) | Column that triggered the event, or -1 if no column. |
| item (object) | Item of the row that triggered the event, or null if no item. |
| buttons (MouseButtons) | Mouse buttons that are pressed during the event |
| modifiers (Keys) | Key modifiers currently pressed |
| location (PointF) | Location of the mouse cursor in the grid |
| delta (SizeF? = null) | Delta of the scroll wheel. |
| pressure (float = 1) | Pressure of a stylus or touch, if applicable. 1.0f for full pressure or not supported |
Properties
Value: The scroll wheel delta.
Handled
Gets or sets a value indicating whether the event is handled.
Remarks: Set this to true if you perform logic with the event and wish the default event to be cancelled. Some platforms may cause audio feedback if the user's action does not perform anything.
Value:
true if handled; otherwise, false.IsDirectionInverted
Gets a value indicating that the MouseEventArgs.Delta is inverted from the direction of the physical device.
Remarks:
This is true when the user has turned on natural (or reverse) scrolling for the device that generated the event, in which case the platform has already flipped the MouseEventArgs.Delta so that the content follows the user's fingers. Use this when you need to move something with the device instead of with the content, such as panning a canvas with a two finger scroll.
Only wheel events report this, and only on platforms that expose the setting per event (currently macOS via NSEvent.isDirectionInvertedFromDevice). Elsewhere this is always false, as the platform gives no way to tell an inverted delta from a regular one.
Value:
true if the delta is inverted from the device; otherwise, false.Location
Gets the location of the mouse relative to the control that raised the event.
Value: The location of the mouse cursor.
Modifiers
Pressure
Gets or sets the pressure of the mouse/stylus press, if applicable. 1.0 if full pressure or not supported.
Value: The pressure of the mouse/stylus.