PointerEventArgs Class
Definition
public class PointerEventArgs
Constructors
| Name | Description |
|---|---|
| PointerEventArgs | No summary available. |
PointerEventArgs Constructor
public PointerEventArgs(Avalonia.Interactivity.RoutedEvent routedEvent, object source, Avalonia.Input.IPointer pointer, Avalonia.Visual rootVisual, Avalonia.Point rootVisualPosition, ulong timestamp, Avalonia.Input.PointerPointProperties properties, Avalonia.Input.KeyModifiers modifiers)
Parameters
routedEvent Avalonia.Interactivity.RoutedEvent
source object
pointer Avalonia.Input.IPointer
rootVisual Avalonia.Visual
rootVisualPosition Avalonia.Point
timestamp ulong
properties Avalonia.Input.PointerPointProperties
modifiers Avalonia.Input.KeyModifiers
Methods
| Name | Description |
|---|---|
| GetCurrentPoint | Returns the PointerPoint associated with the current event |
| GetIntermediatePoints | Returns the PointerPoint associated with the current event |
| GetPosition | Gets the pointer position relative to a control. |
| PreventGestureRecognition | Prevents this event from being handled by other gesture recognizers in the route |
GetCurrentPoint Method
Returns the PointerPoint associated with the current event
public Avalonia.Input.PointerPoint GetCurrentPoint(Avalonia.Visual relativeTo)
Parameters
relativeTo Avalonia.Visual
The visual whose coordinate system to use. Pass null for toplevel coordinate system
Returns
GetIntermediatePoints Method
Returns the PointerPoint associated with the current event
public System.Collections.Generic.IReadOnlyList<Avalonia.Input.PointerPoint> GetIntermediatePoints(Avalonia.Visual relativeTo)
Parameters
relativeTo Avalonia.Visual
The visual which coordinate system to use. Pass null for toplevel coordinate system
Returns
System.Collections.Generic.IReadOnlyList<Avalonia.Input.PointerPoint>
GetPosition Method
Gets the pointer position relative to a control.
public Avalonia.Point GetPosition(Avalonia.Visual relativeTo)
Parameters
relativeTo Avalonia.Visual
The visual whose coordinate system to use. Pass null for toplevel coordinate system
Returns
The pointer position in the control's coordinates.
PreventGestureRecognition Method
Prevents this event from being handled by other gesture recognizers in the route
public void PreventGestureRecognition()
Properties
| Name | Description |
|---|---|
| KeyModifiers | Gets a value that indicates which key modifiers were active at the time that the pointer event was initiated. |
| Pointer | Gets specific pointer generated by input device. |
| Properties | Gets the state the pointer device had when this event occurred. |
| Timestamp | Gets the time when the input occurred. |
| Handled | Gets or sets a value indicating whether the routed event has already been handled. Inherited from RoutedEventArgs. |
| Route | Gets or sets the routing strategy (direct, bubbling, or tunneling) of the routed event. Inherited from RoutedEventArgs. |
| RoutedEvent | Gets or sets the routed event associated with these event args. Inherited from RoutedEventArgs. |
| Source | Gets or sets the source object that raised the routed event. Inherited from RoutedEventArgs. |
KeyModifiers Property
Gets a value that indicates which key modifiers were active at the time that the pointer event was initiated.
public Avalonia.Input.KeyModifiers KeyModifiers { get; set; }
Pointer Property
Gets specific pointer generated by input device.
public Avalonia.Input.IPointer Pointer { get; set; }
Properties Property
Gets the state the pointer device had when this event occurred.
public Avalonia.Input.PointerPointProperties Properties { get; set; }
Timestamp Property
Gets the time when the input occurred.
public ulong Timestamp { get; set; }