Vixen
02b45cc4

GestureSettings

struct Core/Vixen.Ui/Gestures.cs:213
csharp
public readonly record struct GestureSettings

The thresholds that separate one gesture from another.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

⚠ In device-independent pixels and wall-clock time, and both are guesses. The defaults are the platform conventions — half a second for a long press, a third for a double tap — and a touch UI on a small screen will want different ones. They are a parameter rather than a constant so that the argument happens in the application rather than in a patch to this file.

Fields and properties (6)

  • public TimeSpan LongPress

    How long a press has to stay down and still to become a long press.

  • public TimeSpan MultiTapInterval

    How long after a tap a second one still counts as a double.

  • public float TouchSlop

    How far a pointer may wander before a tap becomes a drag — and, for two pointers, how far their separation may change before it becomes a pinch.

  • public float MultiTapSlop

    How far apart two taps may land and still be a double tap. Larger than , because a finger lifted and put down again is less accurate than a finger that never left.

  • public float RotationSlop

    How far the line between two pointers may turn, in radians, before it becomes a rotation. Five degrees — small enough that a deliberate twist is caught immediately, and large enough that two fingers dragging a map in parallel do not slowly rotate it because one hand is steadier than the other.

  • public static GestureSettings Default

    The platform conventions.

Methods (1)

  • public GestureSettings(TimeSpan LongPress, TimeSpan MultiTapInterval, float TouchSlop, float MultiTapSlop, float RotationSlop)

    The thresholds that separate one gesture from another.

Used by (3)

  • GestureRecognizerVixen.Ui
  • GestureTestsVixen.Ui.Tests
  • NumericInputVixen.Ui.Controls