Skip to main content

SwipeGestureEventArgs Class

Definition

Namespace:Avalonia.Input
Assembly:Avalonia.Base
Package:Avalonia

Provides data for swipe gesture events.

public class SwipeGestureEventArgs

Inheritance: EventArgs -> RoutedEventArgs -> SwipeGestureEventArgs

Constructors

NameDescription
SwipeGestureEventArgsInitializes a new instance of the Avalonia.Input.SwipeGestureEventArgs class.

SwipeGestureEventArgs Constructor

Initializes a new instance of the Avalonia.Input.SwipeGestureEventArgs class.

public SwipeGestureEventArgs(int id, Avalonia.Vector delta, Avalonia.Vector velocity)

Parameters

id int

The unique identifier for this gesture.

delta Avalonia.Vector

The pixel delta since the last event.

velocity Avalonia.Vector

The current swipe velocity in pixels per second.

Properties

NameDescription
DeltaGets the pixel delta since the last event.
IdGets the unique identifier for this gesture sequence.
SwipeDirectionGets the direction of the dominant swipe axis.
VelocityGets the current swipe velocity in pixels per second.
HandledGets or sets a value indicating whether the routed event has already been handled. Inherited from RoutedEventArgs.
RouteGets or sets the routing strategy (direct, bubbling, or tunneling) of the routed event. Inherited from RoutedEventArgs.
RoutedEventGets or sets the routed event associated with these event args. Inherited from RoutedEventArgs.
SourceGets or sets the source object that raised the routed event. Inherited from RoutedEventArgs.

Delta Property

Gets the pixel delta since the last event.

public Avalonia.Vector Delta { get; set; }

Id Property

Gets the unique identifier for this gesture sequence.

public int Id { get; set; }

SwipeDirection Property

Gets the direction of the dominant swipe axis.

public Avalonia.Input.SwipeDirection SwipeDirection { get; set; }

Velocity Property

Gets the current swipe velocity in pixels per second.

public Avalonia.Vector Velocity { get; set; }