using System; using Avalonia.Interactivity; namespace Avalonia.Input { public class HoldingRoutedEventArgs : RoutedEventArgs { /// /// Gets the state of the event. /// public HoldingState HoldingState { get; } /// /// Gets the location of the touch, mouse, or pen/stylus contact. /// public Point Position { get; } /// /// Gets the pointer type of the input source. /// public PointerType PointerType { get; } internal PointerEventArgs PointerEventArgs { get; } /// /// Initializes a new instance of the class. /// internal HoldingRoutedEventArgs(HoldingState holdingState, Point position, PointerType pointerType, PointerEventArgs pointerEventArgs) : base(InputElement.HoldingEvent) { PointerEventArgs = pointerEventArgs; HoldingState = holdingState; Position = position; PointerType = pointerType; } } public enum HoldingState { /// /// A single contact has been detected and a time threshold is crossed without the contact being lifted, another contact detected, or another gesture started. /// Started, /// /// The single contact is lifted. /// Completed, /// /// An additional contact is detected or a subsequent gesture (such as a slide) is detected. /// Canceled, } }