Table of Contents

Class SKTapGestureEventArgs

Namespace
SkiaSharp.Extended
Assembly
SkiaSharp.Extended.dll

Provides data for tap gesture events, including single and multi-tap interactions.

public class SKTapGestureEventArgs : EventArgs
Inheritance
SKTapGestureEventArgs
Inherited Members

Remarks

This event argument is used by both TapDetected and DoubleTapDetected events. For single taps, TapCount is 1. For double taps, it is 2 or greater.

The following example shows how to handle tap events:

var tracker = new SKGestureTracker();
tracker.TapDetected += (sender, e) =>
{
    Console.WriteLine($"Tapped at ({e.Location.X}, {e.Location.Y}), count: {e.TapCount}");
};
tracker.DoubleTapDetected += (sender, e) =>
{
    // Set Handled to true to prevent the default double-tap zoom behavior.
    e.Handled = true;
    Console.WriteLine($"Double-tapped at ({e.Location.X}, {e.Location.Y})");
};
TapDetected DoubleTapDetected

Constructors

SKTapGestureEventArgs(SKPoint, int)

Initializes a new instance of the SKTapGestureEventArgs class.

Properties

Handled

Gets or sets a value indicating whether the event has been handled.

Location

Gets the location of the tap in view coordinates.

TapCount

Gets the number of consecutive taps detected.