Table of Contents

Class PointerEventDispatchExtensions

Namespace
Bunit
Assembly
Bunit.Web.dll

Pointer event dispatch helper extension methods.

public static class PointerEventDispatchExtensions
Inheritance
PointerEventDispatchExtensions
Inherited Members

Methods

GotPointerCapture(IElement, PointerEventArgs)

Raises the @ongotpointercapture event on element, passing the provided eventArgs to the event handler.

public static void GotPointerCapture(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

GotPointerCapture(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?, long, float, float, float, float, float, string?, bool)

Raises the @ongotpointercapture event on element, passing the provided properties to the event handler via a PointerEventArgs object.

public static void GotPointerCapture(this IElement element, long detail = 0, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null, long pointerId = 0, float width = 0, float height = 0, float pressure = 0, float tiltX = 0, float tiltY = 0, string? pointerType = null, bool isPrimary = false)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

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.

buttons long

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).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

pointerId long

A unique identifier for the pointer causing the event.

width float

The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer.

height float

The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer.

pressure float

The normalized pressure of the pointer input in the range of 0 to 1, where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively.

tiltX float

The plane angle (in degrees, in the range of -90 to 90) between the Y-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the Y axis.

tiltY float

The plane angle (in degrees, in the range of -90 to 90) between the X-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the X axis.

pointerType string

Indicates the device type that caused the event. Must be one of the strings mouse, pen or touch, or an empty string.

isPrimary bool

Indicates if the pointer represents the primary pointer of this pointer type.

GotPointerCaptureAsync(IElement, PointerEventArgs)

Raises the @ongotpointercapture event on element, passing the provided eventArgs to the event handler.

public static Task GotPointerCaptureAsync(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

LostPointerCapture(IElement, PointerEventArgs)

Raises the @onlostpointercapture event on element, passing the provided eventArgs to the event handler.

public static void LostPointerCapture(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

LostPointerCapture(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?, long, float, float, float, float, float, string?, bool)

Raises the @onlostpointercapture event on element, passing the provided properties to the event handler via a PointerEventArgs object.

public static void LostPointerCapture(this IElement element, long detail = 0, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null, long pointerId = 0, float width = 0, float height = 0, float pressure = 0, float tiltX = 0, float tiltY = 0, string? pointerType = null, bool isPrimary = false)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

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.

buttons long

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).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

pointerId long

A unique identifier for the pointer causing the event.

width float

The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer.

height float

The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer.

pressure float

The normalized pressure of the pointer input in the range of 0 to 1, where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively.

tiltX float

The plane angle (in degrees, in the range of -90 to 90) between the Y-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the Y axis.

tiltY float

The plane angle (in degrees, in the range of -90 to 90) between the X-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the X axis.

pointerType string

Indicates the device type that caused the event. Must be one of the strings mouse, pen or touch, or an empty string.

isPrimary bool

Indicates if the pointer represents the primary pointer of this pointer type.

LostPointerCaptureAsync(IElement, PointerEventArgs)

Raises the @onlostpointercapture event on element, passing the provided eventArgs to the event handler.

public static Task LostPointerCaptureAsync(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

PointerCancel(IElement, PointerEventArgs)

Raises the @onpointercancel event on element, passing the provided eventArgs to the event handler.

public static void PointerCancel(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

PointerCancel(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?, long, float, float, float, float, float, string?, bool)

Raises the @onpointercancel event on element, passing the provided properties to the event handler via a PointerEventArgs object.

public static void PointerCancel(this IElement element, long detail = 0, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null, long pointerId = 0, float width = 0, float height = 0, float pressure = 0, float tiltX = 0, float tiltY = 0, string? pointerType = null, bool isPrimary = false)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

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.

buttons long

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).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

pointerId long

A unique identifier for the pointer causing the event.

width float

The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer.

height float

The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer.

pressure float

The normalized pressure of the pointer input in the range of 0 to 1, where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively.

tiltX float

The plane angle (in degrees, in the range of -90 to 90) between the Y-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the Y axis.

tiltY float

The plane angle (in degrees, in the range of -90 to 90) between the X-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the X axis.

pointerType string

Indicates the device type that caused the event. Must be one of the strings mouse, pen or touch, or an empty string.

isPrimary bool

Indicates if the pointer represents the primary pointer of this pointer type.

PointerCancelAsync(IElement, PointerEventArgs)

Raises the @onpointercancel event on element, passing the provided eventArgs to the event handler.

public static Task PointerCancelAsync(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

PointerDown(IElement, PointerEventArgs)

Raises the @onpointerdown event on element, passing the provided eventArgs to the event handler.

public static void PointerDown(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

PointerDown(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?, long, float, float, float, float, float, string?, bool)

Raises the @onpointerdown event on element, passing the provided properties to the event handler via a PointerEventArgs object.

public static void PointerDown(this IElement element, long detail = 0, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null, long pointerId = 0, float width = 0, float height = 0, float pressure = 0, float tiltX = 0, float tiltY = 0, string? pointerType = null, bool isPrimary = false)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

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.

buttons long

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).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

pointerId long

A unique identifier for the pointer causing the event.

width float

The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer.

height float

The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer.

pressure float

The normalized pressure of the pointer input in the range of 0 to 1, where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively.

tiltX float

The plane angle (in degrees, in the range of -90 to 90) between the Y-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the Y axis.

tiltY float

The plane angle (in degrees, in the range of -90 to 90) between the X-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the X axis.

pointerType string

Indicates the device type that caused the event. Must be one of the strings mouse, pen or touch, or an empty string.

isPrimary bool

Indicates if the pointer represents the primary pointer of this pointer type.

PointerDownAsync(IElement, PointerEventArgs)

Raises the @onpointerdown event on element, passing the provided eventArgs to the event handler.

public static Task PointerDownAsync(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

PointerEnter(IElement, PointerEventArgs)

Raises the @onpointerenter event on element, passing the provided eventArgs to the event handler.

public static void PointerEnter(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

PointerEnter(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?, long, float, float, float, float, float, string?, bool)

Raises the @onpointerenter event on element, passing the provided properties to the event handler via a PointerEventArgs object.

public static void PointerEnter(this IElement element, long detail = 0, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null, long pointerId = 0, float width = 0, float height = 0, float pressure = 0, float tiltX = 0, float tiltY = 0, string? pointerType = null, bool isPrimary = false)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

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.

buttons long

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).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

pointerId long

A unique identifier for the pointer causing the event.

width float

The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer.

height float

The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer.

pressure float

The normalized pressure of the pointer input in the range of 0 to 1, where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively.

tiltX float

The plane angle (in degrees, in the range of -90 to 90) between the Y-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the Y axis.

tiltY float

The plane angle (in degrees, in the range of -90 to 90) between the X-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the X axis.

pointerType string

Indicates the device type that caused the event. Must be one of the strings mouse, pen or touch, or an empty string.

isPrimary bool

Indicates if the pointer represents the primary pointer of this pointer type.

PointerEnterAsync(IElement, PointerEventArgs)

Raises the @onpointerenter event on element, passing the provided eventArgs to the event handler.

public static Task PointerEnterAsync(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

PointerLeave(IElement, PointerEventArgs)

Raises the @onpointerleave event on element, passing the provided eventArgs to the event handler.

public static void PointerLeave(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

PointerLeave(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?, long, float, float, float, float, float, string?, bool)

Raises the @onpointerleave event on element, passing the provided properties to the event handler via a PointerEventArgs object.

public static void PointerLeave(this IElement element, long detail = 0, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null, long pointerId = 0, float width = 0, float height = 0, float pressure = 0, float tiltX = 0, float tiltY = 0, string? pointerType = null, bool isPrimary = false)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

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.

buttons long

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).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

pointerId long

A unique identifier for the pointer causing the event.

width float

The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer.

height float

The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer.

pressure float

The normalized pressure of the pointer input in the range of 0 to 1, where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively.

tiltX float

The plane angle (in degrees, in the range of -90 to 90) between the Y-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the Y axis.

tiltY float

The plane angle (in degrees, in the range of -90 to 90) between the X-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the X axis.

pointerType string

Indicates the device type that caused the event. Must be one of the strings mouse, pen or touch, or an empty string.

isPrimary bool

Indicates if the pointer represents the primary pointer of this pointer type.

PointerLeaveAsync(IElement, PointerEventArgs)

Raises the @onpointerleave event on element, passing the provided eventArgs to the event handler.

public static Task PointerLeaveAsync(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

PointerMove(IElement, PointerEventArgs)

Raises the @onpointermove event on element, passing the provided eventArgs to the event handler.

public static void PointerMove(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

PointerMove(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?, long, float, float, float, float, float, string?, bool)

Raises the @onpointermove event on element, passing the provided properties to the event handler via a PointerEventArgs object.

public static void PointerMove(this IElement element, long detail = 0, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null, long pointerId = 0, float width = 0, float height = 0, float pressure = 0, float tiltX = 0, float tiltY = 0, string? pointerType = null, bool isPrimary = false)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

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.

buttons long

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).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

pointerId long

A unique identifier for the pointer causing the event.

width float

The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer.

height float

The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer.

pressure float

The normalized pressure of the pointer input in the range of 0 to 1, where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively.

tiltX float

The plane angle (in degrees, in the range of -90 to 90) between the Y-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the Y axis.

tiltY float

The plane angle (in degrees, in the range of -90 to 90) between the X-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the X axis.

pointerType string

Indicates the device type that caused the event. Must be one of the strings mouse, pen or touch, or an empty string.

isPrimary bool

Indicates if the pointer represents the primary pointer of this pointer type.

PointerMoveAsync(IElement, PointerEventArgs)

Raises the @onpointermove event on element, passing the provided eventArgs to the event handler.

public static Task PointerMoveAsync(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

PointerOut(IElement, PointerEventArgs)

Raises the @onpointerout event on element, passing the provided eventArgs to the event handler.

public static void PointerOut(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

PointerOut(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?, long, float, float, float, float, float, string?, bool)

Raises the @onpointerout event on element, passing the provided properties to the event handler via a PointerEventArgs object.

public static void PointerOut(this IElement element, long detail = 0, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null, long pointerId = 0, float width = 0, float height = 0, float pressure = 0, float tiltX = 0, float tiltY = 0, string? pointerType = null, bool isPrimary = false)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

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.

buttons long

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).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

pointerId long

A unique identifier for the pointer causing the event.

width float

The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer.

height float

The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer.

pressure float

The normalized pressure of the pointer input in the range of 0 to 1, where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively.

tiltX float

The plane angle (in degrees, in the range of -90 to 90) between the Y-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the Y axis.

tiltY float

The plane angle (in degrees, in the range of -90 to 90) between the X-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the X axis.

pointerType string

Indicates the device type that caused the event. Must be one of the strings mouse, pen or touch, or an empty string.

isPrimary bool

Indicates if the pointer represents the primary pointer of this pointer type.

PointerOutAsync(IElement, PointerEventArgs)

Raises the @onpointerout event on element, passing the provided eventArgs to the event handler.

public static Task PointerOutAsync(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

PointerOver(IElement, PointerEventArgs)

Raises the @onpointerover event on element, passing the provided eventArgs to the event handler.

public static void PointerOver(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

PointerOver(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?, long, float, float, float, float, float, string?, bool)

Raises the @onpointerover event on element, passing the provided properties to the event handler via a PointerEventArgs object.

public static void PointerOver(this IElement element, long detail = 0, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null, long pointerId = 0, float width = 0, float height = 0, float pressure = 0, float tiltX = 0, float tiltY = 0, string? pointerType = null, bool isPrimary = false)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

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.

buttons long

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).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

pointerId long

A unique identifier for the pointer causing the event.

width float

The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer.

height float

The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer.

pressure float

The normalized pressure of the pointer input in the range of 0 to 1, where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively.

tiltX float

The plane angle (in degrees, in the range of -90 to 90) between the Y-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the Y axis.

tiltY float

The plane angle (in degrees, in the range of -90 to 90) between the X-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the X axis.

pointerType string

Indicates the device type that caused the event. Must be one of the strings mouse, pen or touch, or an empty string.

isPrimary bool

Indicates if the pointer represents the primary pointer of this pointer type.

PointerOverAsync(IElement, PointerEventArgs)

Raises the @onpointerover event on element, passing the provided eventArgs to the event handler.

public static Task PointerOverAsync(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

PointerUp(IElement, PointerEventArgs)

Raises the @onpointerup event on element, passing the provided eventArgs to the event handler.

public static void PointerUp(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

PointerUp(IElement, long, double, double, double, double, long, long, bool, bool, bool, bool, string?, long, float, float, float, float, float, string?, bool)

Raises the @onpointerup event on element, passing the provided properties to the event handler via a PointerEventArgs object.

public static void PointerUp(this IElement element, long detail = 0, double screenX = 0, double screenY = 0, double clientX = 0, double clientY = 0, long button = 0, long buttons = 0, bool ctrlKey = false, bool shiftKey = false, bool altKey = false, bool metaKey = false, string? type = null, long pointerId = 0, float width = 0, float height = 0, float pressure = 0, float tiltX = 0, float tiltY = 0, string? pointerType = null, bool isPrimary = false)

Parameters

element IElement

The element to raise the event on.

detail long

A count of consecutive clicks that happened in a short amount of time, incremented by one.

screenX double

The X coordinate of the mouse pointer in global (screen) coordinates.

screenY double

The Y coordinate of the mouse pointer in global (screen) coordinates.

clientX double

The X coordinate of the mouse pointer in local (DOM content) coordinates.

clientY double

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

button long

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.

buttons long

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).

ctrlKey bool

true if the control key was down when the event was fired. false otherwise.

shiftKey bool

true if the shift key was down when the event was fired. false otherwise.

altKey bool

true if the alt key was down when the event was fired. false otherwise.

metaKey bool

true if the meta key was down when the event was fired. false otherwise.

type string

Gets or sets the type of the event.

pointerId long

A unique identifier for the pointer causing the event.

width float

The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer.

height float

The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer.

pressure float

The normalized pressure of the pointer input in the range of 0 to 1, where 0 and 1 represent the minimum and maximum pressure the hardware is capable of detecting, respectively.

tiltX float

The plane angle (in degrees, in the range of -90 to 90) between the Y-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the Y axis.

tiltY float

The plane angle (in degrees, in the range of -90 to 90) between the X-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the X axis.

pointerType string

Indicates the device type that caused the event. Must be one of the strings mouse, pen or touch, or an empty string.

isPrimary bool

Indicates if the pointer represents the primary pointer of this pointer type.

PointerUpAsync(IElement, PointerEventArgs)

Raises the @onpointerup event on element, passing the provided eventArgs to the event handler.

public static Task PointerUpAsync(this IElement element, PointerEventArgs eventArgs)

Parameters

element IElement

The element to raise the event on.

eventArgs PointerEventArgs

The event arguments to pass to the event handler.

Returns

Task

A task that completes when the event handler is done.

Progress Telerik

Premium sponsor: Progress Telerik.

Packt

Editorial support provided by Packt.

.NET Foundation

Supported by the .NET Foundation.