csharpc-sharpdotnetxamlavaloniauicross-platformcross-platform-xamlavaloniaguimulti-platformuser-interfacedotnetcore
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.7 KiB
54 lines
1.7 KiB
using System;
|
|
using Avalonia.Interactivity;
|
|
|
|
namespace Avalonia.Input
|
|
{
|
|
public class HoldingRoutedEventArgs : RoutedEventArgs
|
|
{
|
|
/// <summary>
|
|
/// Gets the state of the <see cref="InputElement.HoldingEvent"/> event.
|
|
/// </summary>
|
|
public HoldingState HoldingState { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the location of the touch, mouse, or pen/stylus contact.
|
|
/// </summary>
|
|
public Point Position { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the pointer type of the input source.
|
|
/// </summary>
|
|
public PointerType PointerType { get; }
|
|
|
|
internal PointerEventArgs PointerEventArgs { get; }
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="HoldingRoutedEventArgs"/> class.
|
|
/// </summary>
|
|
internal HoldingRoutedEventArgs(HoldingState holdingState, Point position, PointerType pointerType, PointerEventArgs pointerEventArgs) : base(InputElement.HoldingEvent)
|
|
{
|
|
PointerEventArgs = pointerEventArgs;
|
|
HoldingState = holdingState;
|
|
Position = position;
|
|
PointerType = pointerType;
|
|
}
|
|
}
|
|
|
|
public enum HoldingState
|
|
{
|
|
/// <summary>
|
|
/// A single contact has been detected and a time threshold is crossed without the contact being lifted, another contact detected, or another gesture started.
|
|
/// </summary>
|
|
Started,
|
|
|
|
/// <summary>
|
|
/// The single contact is lifted.
|
|
/// </summary>
|
|
Completed,
|
|
|
|
/// <summary>
|
|
/// An additional contact is detected or a subsequent gesture (such as a slide) is detected.
|
|
/// </summary>
|
|
Canceled,
|
|
}
|
|
}
|
|
|