4 changed files with 25 additions and 51 deletions
@ -0,0 +1,18 @@ |
|||||
|
using Avalonia.Interactivity; |
||||
|
using Avalonia.VisualTree; |
||||
|
|
||||
|
namespace Avalonia.Input |
||||
|
{ |
||||
|
public class TappedEventArgs : RoutedEventArgs |
||||
|
{ |
||||
|
private readonly PointerEventArgs lastPointerEventArgs; |
||||
|
|
||||
|
public TappedEventArgs(RoutedEvent routedEvent, PointerEventArgs lastPointerEventArgs) |
||||
|
: base(routedEvent) |
||||
|
{ |
||||
|
this.lastPointerEventArgs = lastPointerEventArgs; |
||||
|
} |
||||
|
|
||||
|
public Point GetPosition(IVisual? relativeTo) => lastPointerEventArgs.GetPosition(relativeTo); |
||||
|
} |
||||
|
} |
||||
@ -1,44 +0,0 @@ |
|||||
using Avalonia.Interactivity; |
|
||||
using Avalonia.VisualTree; |
|
||||
|
|
||||
namespace Avalonia.Input |
|
||||
{ |
|
||||
public class DoubleTappedEventArgs : RoutedEventArgs |
|
||||
{ |
|
||||
private readonly PointerEventArgs lastPointerEventArgs; |
|
||||
|
|
||||
public DoubleTappedEventArgs(PointerEventArgs lastPointerEventArgs) |
|
||||
: base(Gestures.DoubleTappedEvent) |
|
||||
{ |
|
||||
this.lastPointerEventArgs = lastPointerEventArgs; |
|
||||
} |
|
||||
|
|
||||
public Point GetPosition(IVisual? relativeTo) => lastPointerEventArgs.GetPosition(relativeTo); |
|
||||
} |
|
||||
|
|
||||
public class TappedEventArgs : RoutedEventArgs |
|
||||
{ |
|
||||
private readonly PointerEventArgs lastPointerEventArgs; |
|
||||
|
|
||||
public TappedEventArgs(PointerEventArgs lastPointerEventArgs) |
|
||||
: base(Gestures.DoubleTappedEvent) |
|
||||
{ |
|
||||
this.lastPointerEventArgs = lastPointerEventArgs; |
|
||||
} |
|
||||
|
|
||||
public Point GetPosition(IVisual? relativeTo) => lastPointerEventArgs.GetPosition(relativeTo); |
|
||||
} |
|
||||
|
|
||||
public class RightTappedEventArgs : RoutedEventArgs |
|
||||
{ |
|
||||
private readonly PointerEventArgs lastPointerEventArgs; |
|
||||
|
|
||||
public RightTappedEventArgs(PointerEventArgs lastPointerEventArgs) |
|
||||
: base(Gestures.DoubleTappedEvent) |
|
||||
{ |
|
||||
this.lastPointerEventArgs = lastPointerEventArgs; |
|
||||
} |
|
||||
|
|
||||
public Point GetPosition(IVisual? relativeTo) => lastPointerEventArgs.GetPosition(relativeTo); |
|
||||
} |
|
||||
} |
|
||||
Loading…
Reference in new issue