Table of Contents

Class GestureConfigDrag

Namespace
Stride.Input
Assembly
Stride.Input.dll

Configuration class for the Drag gesture.

public sealed class GestureConfigDrag : GestureConfig
Inheritance
GestureConfigDrag
Inherited Members

Remarks

A drag gesture can be composed of 1 or more fingers.

Constructors

GestureConfigDrag()

Create a default drag gesture configuration for one finger free dragging.

public GestureConfigDrag()

GestureConfigDrag(GestureShape)

Create a default drag gesture configuration for one finger dragging.

public GestureConfigDrag(GestureShape dragShape)

Parameters

dragShape GestureShape

The dragging shape

Properties

AllowedErrorMargins

The (x,y) error margins allowed during directional dragging.

public Vector2 AllowedErrorMargins { get; set; }

Property Value

Vector2

Remarks

Those values are used only for directional (vertical or horizontal) dragging. Decrease those values to trigger the gesture only when the dragging is perfectly in the desired direction. Increase those values to allow directional gestures to be more approximative.

Exceptions

InvalidOperationException

Tried to modify the configuration after it has been frozen by the system.

ArgumentOutOfRangeException

The provided x or y value was not positive.

DragShape

The shape (direction) of the drag gesture.

public GestureShape DragShape { get; set; }

Property Value

GestureShape

Exceptions

InvalidOperationException

Tried to modify the configuration after it has been frozen by the system.

MinimumDragDistance

Specify the minimum translation distance required before that the gesture can be recognized as a Drag.

public float MinimumDragDistance { get; set; }

Property Value

float

Remarks

The user can reduce this value if he needs the drag gesture to be triggered even for very small drags. On the contrary, he can increase this value if he wants to avoid to deals with too small drags.

Exceptions

InvalidOperationException

Tried to modify the configuration after it has been frozen by the system.

ArgumentOutOfRangeException

The provided value was negative.