Class MouseEventDispatchExtensions
Mouse event dispatch helper extension methods.
Inheritance
Namespace: Bunit
Assembly: Bunit.Web.dll
Syntax
public static class MouseEventDispatchExtensions : object
Methods
| Improve this Doc View SourceClick(IElement, MouseEventArgs)
Raises the @onclick
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static void Click(this IElement element, MouseEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
MouseEventArgs | eventArgs | The event arguments to pass to the event handler. |
Click(IElement, Int64, Double, Double, Double, Double, Int64, Int64, Boolean, Boolean, Boolean, Boolean, Nullable<String>)
Raises the @onclick
event on element
, passing the provided
properties to the event handler via a
Declaration
public static void Click(this IElement element, long detail = null, double screenX = null, double screenY = null, double clientX = null, double clientY = null, long button = null, long buttons = null, bool ctrlKey = null, bool shiftKey = null, bool altKey = null, bool metaKey = null, string? type = null)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
System.Int64 | detail | A count of consecutive clicks that happened in a short amount of time, incremented by one. |
System.Double | screenX | The X coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | screenY | The Y coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | clientX | The X coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Double | clientY | The Y coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Int64 | button | The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left. |
System.Int64 | buttons | The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2). |
System.Boolean | ctrlKey | true if the control key was down when the event was fired. false otherwise. |
System.Boolean | shiftKey | true if the shift key was down when the event was fired. false otherwise. |
System.Boolean | altKey | true if the alt key was down when the event was fired. false otherwise. |
System.Boolean | metaKey | true if the meta key was down when the event was fired. false otherwise. |
System.Nullable<System.String> | type | Gets or sets the type of the event. |
ClickAsync(IElement, MouseEventArgs)
Raises the @onclick
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static Task ClickAsync(this IElement element, MouseEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
MouseEventArgs | eventArgs | The event arguments to pass to the event handler. |
Returns
Type | Description |
---|---|
Task | A task that completes when the event handler is done. |
ContextMenu(IElement, MouseEventArgs)
Raises the @oncontextmenu
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static void ContextMenu(this IElement element, MouseEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
MouseEventArgs | eventArgs | The event arguments to pass to the event handler. |
ContextMenu(IElement, Int64, Double, Double, Double, Double, Int64, Int64, Boolean, Boolean, Boolean, Boolean, Nullable<String>)
Raises the @oncontextmenu
event on element
, passing the provided
properties to the event handler via a
Declaration
public static void ContextMenu(this IElement element, long detail = null, double screenX = null, double screenY = null, double clientX = null, double clientY = null, long button = null, long buttons = null, bool ctrlKey = null, bool shiftKey = null, bool altKey = null, bool metaKey = null, string? type = null)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
System.Int64 | detail | A count of consecutive clicks that happened in a short amount of time, incremented by one. |
System.Double | screenX | The X coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | screenY | The Y coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | clientX | The X coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Double | clientY | The Y coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Int64 | button | The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left. |
System.Int64 | buttons | The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2). |
System.Boolean | ctrlKey | true if the control key was down when the event was fired. false otherwise. |
System.Boolean | shiftKey | true if the shift key was down when the event was fired. false otherwise. |
System.Boolean | altKey | true if the alt key was down when the event was fired. false otherwise. |
System.Boolean | metaKey | true if the meta key was down when the event was fired. false otherwise. |
System.Nullable<System.String> | type | Gets or sets the type of the event. |
ContextMenuAsync(IElement, MouseEventArgs)
Raises the @oncontextmenu
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static Task ContextMenuAsync(this IElement element, MouseEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
MouseEventArgs | eventArgs | The event arguments to pass to the event handler. |
Returns
Type | Description |
---|---|
Task | A task that completes when the event handler is done. |
DoubleClick(IElement, MouseEventArgs)
Raises the @ondblclick
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static void DoubleClick(this IElement element, MouseEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
MouseEventArgs | eventArgs | The event arguments to pass to the event handler. |
DoubleClick(IElement, Int64, Double, Double, Double, Double, Int64, Int64, Boolean, Boolean, Boolean, Boolean, Nullable<String>)
Raises the @ondblclick
event on element
, passing the provided
properties to the event handler via a
Declaration
public static void DoubleClick(this IElement element, long detail = null, double screenX = null, double screenY = null, double clientX = null, double clientY = null, long button = null, long buttons = null, bool ctrlKey = null, bool shiftKey = null, bool altKey = null, bool metaKey = null, string? type = null)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
System.Int64 | detail | A count of consecutive clicks that happened in a short amount of time, incremented by one. |
System.Double | screenX | The X coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | screenY | The Y coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | clientX | The X coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Double | clientY | The Y coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Int64 | button | The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left. |
System.Int64 | buttons | The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2). |
System.Boolean | ctrlKey | true if the control key was down when the event was fired. false otherwise. |
System.Boolean | shiftKey | true if the shift key was down when the event was fired. false otherwise. |
System.Boolean | altKey | true if the alt key was down when the event was fired. false otherwise. |
System.Boolean | metaKey | true if the meta key was down when the event was fired. false otherwise. |
System.Nullable<System.String> | type | Gets or sets the type of the event. |
DoubleClickAsync(IElement, MouseEventArgs)
Raises the @ondblclick
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static Task DoubleClickAsync(this IElement element, MouseEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
MouseEventArgs | eventArgs | The event arguments to pass to the event handler. |
Returns
Type | Description |
---|---|
Task | A task that completes when the event handler is done. |
MouseDown(IElement, MouseEventArgs)
Raises the @onmousedown
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static void MouseDown(this IElement element, MouseEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
MouseEventArgs | eventArgs | The event arguments to pass to the event handler. |
MouseDown(IElement, Int64, Double, Double, Double, Double, Int64, Int64, Boolean, Boolean, Boolean, Boolean, Nullable<String>)
Raises the @onmousedown
event on element
, passing the provided
properties to the event handler via a
Declaration
public static void MouseDown(this IElement element, long detail = null, double screenX = null, double screenY = null, double clientX = null, double clientY = null, long button = null, long buttons = null, bool ctrlKey = null, bool shiftKey = null, bool altKey = null, bool metaKey = null, string? type = null)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
System.Int64 | detail | A count of consecutive clicks that happened in a short amount of time, incremented by one. |
System.Double | screenX | The X coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | screenY | The Y coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | clientX | The X coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Double | clientY | The Y coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Int64 | button | The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left. |
System.Int64 | buttons | The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2). |
System.Boolean | ctrlKey | true if the control key was down when the event was fired. false otherwise. |
System.Boolean | shiftKey | true if the shift key was down when the event was fired. false otherwise. |
System.Boolean | altKey | true if the alt key was down when the event was fired. false otherwise. |
System.Boolean | metaKey | true if the meta key was down when the event was fired. false otherwise. |
System.Nullable<System.String> | type | Gets or sets the type of the event. |
MouseDownAsync(IElement, MouseEventArgs)
Raises the @onmousedown
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static Task MouseDownAsync(this IElement element, MouseEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
MouseEventArgs | eventArgs | The event arguments to pass to the event handler. |
Returns
Type | Description |
---|---|
Task | A task that completes when the event handler is done. |
MouseMove(IElement, MouseEventArgs)
Raises the @onmousemove
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static void MouseMove(this IElement element, MouseEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
MouseEventArgs | eventArgs | The event arguments to pass to the event handler. |
MouseMove(IElement, Int64, Double, Double, Double, Double, Int64, Int64, Boolean, Boolean, Boolean, Boolean, Nullable<String>)
Raises the @onmousemove
event on element
, passing the provided
properties to the event handler via a
Declaration
public static void MouseMove(this IElement element, long detail = null, double screenX = null, double screenY = null, double clientX = null, double clientY = null, long button = null, long buttons = null, bool ctrlKey = null, bool shiftKey = null, bool altKey = null, bool metaKey = null, string? type = null)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
System.Int64 | detail | A count of consecutive clicks that happened in a short amount of time, incremented by one. |
System.Double | screenX | The X coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | screenY | The Y coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | clientX | The X coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Double | clientY | The Y coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Int64 | button | The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left. |
System.Int64 | buttons | The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2). |
System.Boolean | ctrlKey | true if the control key was down when the event was fired. false otherwise. |
System.Boolean | shiftKey | true if the shift key was down when the event was fired. false otherwise. |
System.Boolean | altKey | true if the alt key was down when the event was fired. false otherwise. |
System.Boolean | metaKey | true if the meta key was down when the event was fired. false otherwise. |
System.Nullable<System.String> | type | Gets or sets the type of the event. |
MouseMoveAsync(IElement, MouseEventArgs)
Raises the @onmousemove
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static Task MouseMoveAsync(this IElement element, MouseEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
MouseEventArgs | eventArgs | The event arguments to pass to the event handler. |
Returns
Type | Description |
---|---|
Task | A task that completes when the event handler is done. |
MouseOut(IElement, MouseEventArgs)
Raises the @onmouseout
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static void MouseOut(this IElement element, MouseEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
MouseEventArgs | eventArgs | The event arguments to pass to the event handler. |
MouseOut(IElement, Int64, Double, Double, Double, Double, Int64, Int64, Boolean, Boolean, Boolean, Boolean, Nullable<String>)
Raises the @onmouseout
event on element
, passing the provided
properties to the event handler via a
Declaration
public static void MouseOut(this IElement element, long detail = null, double screenX = null, double screenY = null, double clientX = null, double clientY = null, long button = null, long buttons = null, bool ctrlKey = null, bool shiftKey = null, bool altKey = null, bool metaKey = null, string? type = null)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
System.Int64 | detail | A count of consecutive clicks that happened in a short amount of time, incremented by one. |
System.Double | screenX | The X coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | screenY | The Y coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | clientX | The X coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Double | clientY | The Y coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Int64 | button | The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left. |
System.Int64 | buttons | The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2). |
System.Boolean | ctrlKey | true if the control key was down when the event was fired. false otherwise. |
System.Boolean | shiftKey | true if the shift key was down when the event was fired. false otherwise. |
System.Boolean | altKey | true if the alt key was down when the event was fired. false otherwise. |
System.Boolean | metaKey | true if the meta key was down when the event was fired. false otherwise. |
System.Nullable<System.String> | type | Gets or sets the type of the event. |
MouseOutAsync(IElement, MouseEventArgs)
Raises the @onmouseout
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static Task MouseOutAsync(this IElement element, MouseEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
MouseEventArgs | eventArgs | The event arguments to pass to the event handler. |
Returns
Type | Description |
---|---|
Task | A task that completes when the event handler is done. |
MouseOver(IElement, MouseEventArgs)
Raises the @onmouseover
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static void MouseOver(this IElement element, MouseEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
MouseEventArgs | eventArgs | The event arguments to pass to the event handler. |
MouseOver(IElement, Int64, Double, Double, Double, Double, Int64, Int64, Boolean, Boolean, Boolean, Boolean, Nullable<String>)
Raises the @onmouseover
event on element
, passing the provided
properties to the event handler via a
Declaration
public static void MouseOver(this IElement element, long detail = null, double screenX = null, double screenY = null, double clientX = null, double clientY = null, long button = null, long buttons = null, bool ctrlKey = null, bool shiftKey = null, bool altKey = null, bool metaKey = null, string? type = null)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
System.Int64 | detail | A count of consecutive clicks that happened in a short amount of time, incremented by one. |
System.Double | screenX | The X coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | screenY | The Y coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | clientX | The X coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Double | clientY | The Y coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Int64 | button | The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left. |
System.Int64 | buttons | The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2). |
System.Boolean | ctrlKey | true if the control key was down when the event was fired. false otherwise. |
System.Boolean | shiftKey | true if the shift key was down when the event was fired. false otherwise. |
System.Boolean | altKey | true if the alt key was down when the event was fired. false otherwise. |
System.Boolean | metaKey | true if the meta key was down when the event was fired. false otherwise. |
System.Nullable<System.String> | type | Gets or sets the type of the event. |
MouseOverAsync(IElement, MouseEventArgs)
Raises the @onmouseover
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static Task MouseOverAsync(this IElement element, MouseEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
MouseEventArgs | eventArgs | The event arguments to pass to the event handler. |
Returns
Type | Description |
---|---|
Task | A task that completes when the event handler is done. |
MouseUp(IElement, MouseEventArgs)
Raises the @onmouseup
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static void MouseUp(this IElement element, MouseEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
MouseEventArgs | eventArgs | The event arguments to pass to the event handler. |
MouseUp(IElement, Int64, Double, Double, Double, Double, Int64, Int64, Boolean, Boolean, Boolean, Boolean, Nullable<String>)
Raises the @onmouseup
event on element
, passing the provided
properties to the event handler via a
Declaration
public static void MouseUp(this IElement element, long detail = null, double screenX = null, double screenY = null, double clientX = null, double clientY = null, long button = null, long buttons = null, bool ctrlKey = null, bool shiftKey = null, bool altKey = null, bool metaKey = null, string? type = null)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
System.Int64 | detail | A count of consecutive clicks that happened in a short amount of time, incremented by one. |
System.Double | screenX | The X coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | screenY | The Y coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | clientX | The X coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Double | clientY | The Y coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Int64 | button | The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left. |
System.Int64 | buttons | The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2). |
System.Boolean | ctrlKey | true if the control key was down when the event was fired. false otherwise. |
System.Boolean | shiftKey | true if the shift key was down when the event was fired. false otherwise. |
System.Boolean | altKey | true if the alt key was down when the event was fired. false otherwise. |
System.Boolean | metaKey | true if the meta key was down when the event was fired. false otherwise. |
System.Nullable<System.String> | type | Gets or sets the type of the event. |
MouseUpAsync(IElement, MouseEventArgs)
Raises the @onmouseup
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static Task MouseUpAsync(this IElement element, MouseEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
MouseEventArgs | eventArgs | The event arguments to pass to the event handler. |
Returns
Type | Description |
---|---|
Task | A task that completes when the event handler is done. |
MouseWheel(IElement, Int64, Double, Double, Double, Double, Int64, Int64, Boolean, Boolean, Boolean, Boolean, Nullable<String>, Double, Double, Double, Int64)
Raises the @onmousewheel
event on element
, passing the provided
properties to the event handler via a
Declaration
public static void MouseWheel(this IElement element, long detail = null, double screenX = null, double screenY = null, double clientX = null, double clientY = null, long button = null, long buttons = null, bool ctrlKey = null, bool shiftKey = null, bool altKey = null, bool metaKey = null, string? type = null, double deltaX = null, double deltaY = null, double deltaZ = null, long deltaMode = null)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
System.Int64 | detail | A count of consecutive clicks that happened in a short amount of time, incremented by one. |
System.Double | screenX | The X coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | screenY | The Y coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | clientX | The X coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Double | clientY | The Y coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Int64 | button | The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left. |
System.Int64 | buttons | The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2). |
System.Boolean | ctrlKey | true if the control key was down when the event was fired. false otherwise. |
System.Boolean | shiftKey | true if the shift key was down when the event was fired. false otherwise. |
System.Boolean | altKey | true if the alt key was down when the event was fired. false otherwise. |
System.Boolean | metaKey | true if the meta key was down when the event was fired. false otherwise. |
System.Nullable<System.String> | type | Gets or sets the type of the event. |
System.Double | deltaX | The horizontal scroll amount. |
System.Double | deltaY | The vertical scroll amount. |
System.Double | deltaZ | The scroll amount for the z-axis. |
System.Int64 | deltaMode | The unit of the delta values scroll amount. |
MouseWheel(IElement, WheelEventArgs)
Raises the @onmousewheel
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static void MouseWheel(this IElement element, WheelEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
WheelEventArgs | eventArgs | The event arguments to pass to the event handler. |
MouseWheelAsync(IElement, WheelEventArgs)
Raises the @onmousewheel
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static Task MouseWheelAsync(this IElement element, WheelEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
WheelEventArgs | eventArgs | The event arguments to pass to the event handler. |
Returns
Type | Description |
---|---|
Task | A task that completes when the event handler is done. |
Wheel(IElement, Int64, Double, Double, Double, Double, Int64, Int64, Boolean, Boolean, Boolean, Boolean, Nullable<String>, Double, Double, Double, Int64)
Raises the @onwheel
event on element
, passing the provided
properties to the event handler via a
Declaration
public static void Wheel(this IElement element, long detail = null, double screenX = null, double screenY = null, double clientX = null, double clientY = null, long button = null, long buttons = null, bool ctrlKey = null, bool shiftKey = null, bool altKey = null, bool metaKey = null, string? type = null, double deltaX = null, double deltaY = null, double deltaZ = null, long deltaMode = null)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
System.Int64 | detail | A count of consecutive clicks that happened in a short amount of time, incremented by one. |
System.Double | screenX | The X coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | screenY | The Y coordinate of the mouse pointer in global (screen) coordinates. |
System.Double | clientX | The X coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Double | clientY | The Y coordinate of the mouse pointer in local (DOM content) coordinates. |
System.Int64 | button | The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left. |
System.Int64 | buttons | The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2). |
System.Boolean | ctrlKey | true if the control key was down when the event was fired. false otherwise. |
System.Boolean | shiftKey | true if the shift key was down when the event was fired. false otherwise. |
System.Boolean | altKey | true if the alt key was down when the event was fired. false otherwise. |
System.Boolean | metaKey | true if the meta key was down when the event was fired. false otherwise. |
System.Nullable<System.String> | type | Gets or sets the type of the event. |
System.Double | deltaX | The horizontal scroll amount. |
System.Double | deltaY | The vertical scroll amount. |
System.Double | deltaZ | The scroll amount for the z-axis. |
System.Int64 | deltaMode | The unit of the delta values scroll amount. |
Wheel(IElement, WheelEventArgs)
Raises the @onwheel
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static void Wheel(this IElement element, WheelEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
WheelEventArgs | eventArgs | The event arguments to pass to the event handler. |
WheelAsync(IElement, WheelEventArgs)
Raises the @onwheel
event on element
, passing the provided eventArgs
to the event handler.
Declaration
public static Task WheelAsync(this IElement element, WheelEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
IElement | element | The element to raise the event on. |
WheelEventArgs | eventArgs | The event arguments to pass to the event handler. |
Returns
Type | Description |
---|---|
Task | A task that completes when the event handler is done. |