Class PointerEventArgs
public class PointerEventArgs : RoutedEventArgs
- Inheritance
-
PointerEventArgs
- Derived
- Inherited Members
Constructors
PointerEventArgs(RoutedEvent, object?, IPointer, Visual?, Point, ulong, PointerPointProperties, KeyModifiers)
[Unstable("This constructor might be removed in 12.0. For unit testing, consider using IHeadlessWindow mouse methods.")]
public PointerEventArgs(RoutedEvent routedEvent, object? source, IPointer pointer, Visual? rootVisual, Point rootVisualPosition, ulong timestamp, PointerPointProperties properties, KeyModifiers modifiers)
Parameters
routedEvent
RoutedEventsource
objectpointer
IPointerrootVisual
VisualrootVisualPosition
Pointtimestamp
ulongproperties
PointerPointPropertiesmodifiers
KeyModifiers
Properties
KeyModifiers
Gets a value that indicates which key modifiers were active at the time that the pointer event was initiated.
public KeyModifiers KeyModifiers { get; }
Property Value
Pointer
Gets specific pointer generated by input device.
public IPointer Pointer { get; }
Property Value
Properties
Returns the current pointer point properties
protected PointerPointProperties Properties { get; }
Property Value
Timestamp
Gets the time when the input occurred.
public ulong Timestamp { get; }
Property Value
Methods
GetCurrentPoint(Visual?)
Returns the PointerPoint associated with the current event
public PointerPoint GetCurrentPoint(Visual? relativeTo)
Parameters
relativeTo
VisualThe visual whose coordinate system to use. Pass null for toplevel coordinate system
Returns
GetIntermediatePoints(Visual?)
Returns the PointerPoint associated with the current event
public IReadOnlyList<PointerPoint> GetIntermediatePoints(Visual? relativeTo)
Parameters
relativeTo
VisualThe visual which coordinate system to use. Pass null for toplevel coordinate system
Returns
GetPosition(Visual?)
Gets the pointer position relative to a control.
public Point GetPosition(Visual? relativeTo)
Parameters
relativeTo
VisualThe visual whose coordinate system to use. Pass null for toplevel coordinate system
Returns
- Point
The pointer position in the control's coordinates.
PreventGestureRecognition()
Prevents this event from being handled by other gesture recognizers in the route
public void PreventGestureRecognition()