MouseEventArgs
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.1.0.0)
Provides data for the MouseUp, MouseDown, and MouseMove events.
- C#
- VB.NET
public class MouseEventArgs : EventArgs
Public Class MouseEventArgs
Inherits EventArgs
Constructors
MouseEventArgs(button, clicks, x, y, delta)
Initializes a new instance of the MouseEventArgs class.
| Name | Type | Description |
|---|---|---|
| button | MouseButtons | One of the MouseButtons values that indicate which mouse button was pressed. |
| clicks | Int32 | The number of times a mouse button was pressed. |
| x | Int32 | The x-coordinate of a pointer click, in pixels. |
| y | Int32 | The y-coordinate of a pointer click, in pixels. |
| delta | Int32 | A signed count of the number of dents the wheel has rotated. |
MouseEventArgs(button, clicks, x, y, delta, role)
Initializes a new instance of the MouseEventArgs class.
| Name | Type | Description |
|---|---|---|
| button | MouseButtons | One of the MouseButtons values that indicate which mouse button was pressed. |
| clicks | Int32 | The number of times a mouse button was pressed. |
| x | Int32 | The x-coordinate of a pointer click, in pixels. |
| y | Int32 | The y-coordinate of a pointer click, in pixels. |
| delta | Int32 | A signed count of the number of dents the wheel has rotated. |
| role | String | The internal role assigned to the element that generated the pointer event. |
Properties
Button
MouseButtons: Returns which mouse button was pressed.
Value: One of the MouseButtons values.
Clicks
Int32: Returns the number of clicks or taps.
Value: The number of clicks or taps.
Delta
Int32: Returns the number of times the mouse wheel has rotated.
Value: The number of times the mouse wheel has rotated.
Location
Point: Returns the location of the mouse or pointer event.
Value: A Point that contains the x and y coordinates n pixels.
OriginalTarget
Control: Returns the original target Control when the pointer event has bubbled up because the original target was either not Enabled or Anonymous.
Role
String: Returns the internal role assigned to the element that generated the pointer event: checkbox, button, ...
The value in the Role property is taken from the "role" attribute of the clicked element inside the widget. You can detect clicks on custom HTML content by adding the role attribute to the custom element.
X
Int32: Returns the x-coordinate of the mouse or touch event.
Value: The x-coordinate in pixels.
Y
Int32: Returns the y-coordinate of the mouse or touch event.
Value: The y-coordinate in pixels.
Used By
| Name | Description |
|---|---|
| MouseEventHandler | Represents the method that will handle the MouseDown, MouseUp, or MouseMove event of a form, control, or other component. |