|
|
@ -56,26 +56,23 @@ namespace Perspex.Input |
|
|
public static readonly RoutedEvent<PointerEventArgs> PointerReleasedEvent = |
|
|
public static readonly RoutedEvent<PointerEventArgs> PointerReleasedEvent = |
|
|
RoutedEvent.Register<InputElement, PointerEventArgs>("PointerReleased", RoutingStrategy.Bubble); |
|
|
RoutedEvent.Register<InputElement, PointerEventArgs>("PointerReleased", RoutingStrategy.Bubble); |
|
|
|
|
|
|
|
|
public static readonly RoutedEvent<PointerEventArgs> PointerWheelChangedEvent = |
|
|
public static readonly RoutedEvent<PointerWheelEventArgs> PointerWheelChangedEvent = |
|
|
RoutedEvent.Register<InputElement, PointerEventArgs>("PointerWheelChanged", RoutingStrategy.Bubble); |
|
|
RoutedEvent.Register<InputElement, PointerWheelEventArgs>("PointerWheelChanged", RoutingStrategy.Bubble); |
|
|
|
|
|
|
|
|
static InputElement() |
|
|
static InputElement() |
|
|
{ |
|
|
{ |
|
|
IsEnabledProperty.Changed.Subscribe(IsEnabledChanged); |
|
|
IsEnabledProperty.Changed.Subscribe(IsEnabledChanged); |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public InputElement() |
|
|
GotFocusEvent.AddClassHandler<InputElement>(x => x.OnGotFocus); |
|
|
{ |
|
|
LostFocusEvent.AddClassHandler<InputElement>(x => x.OnLostFocus); |
|
|
this.GotFocus += (_, e) => this.OnGotFocus(e); |
|
|
KeyDownEvent.AddClassHandler<InputElement>(x => x.OnKeyDown); |
|
|
this.LostFocus += (_, e) => this.OnLostFocus(e); |
|
|
PreviewKeyDownEvent.AddClassHandler<InputElement>(x => x.OnPreviewKeyDown); |
|
|
this.KeyDown += (_, e) => this.OnKeyDown(e); |
|
|
PointerEnterEvent.AddClassHandler<InputElement>(x => x.OnPointerEnter); |
|
|
this.PreviewKeyDown += (_, e) => this.OnPreviewKeyDown(e); |
|
|
PointerLeaveEvent.AddClassHandler<InputElement>(x => x.OnPointerLeave); |
|
|
this.PointerEnter += (_, e) => this.OnPointerEnter(e); |
|
|
PointerMovedEvent.AddClassHandler<InputElement>(x => x.OnPointerMoved); |
|
|
this.PointerLeave += (_, e) => this.OnPointerLeave(e); |
|
|
PointerPressedEvent.AddClassHandler<InputElement>(x => x.OnPointerPressed); |
|
|
this.PointerMoved += (_, e) => this.OnPointerMoved(e); |
|
|
PointerReleasedEvent.AddClassHandler<InputElement>(x => x.OnPointerReleased); |
|
|
this.PointerPressed += (_, e) => this.OnPointerPressed(e); |
|
|
PointerWheelChangedEvent.AddClassHandler<InputElement>(x => x.OnPointerWheelChanged); |
|
|
this.PointerReleased += (_, e) => this.OnPointerReleased(e); |
|
|
|
|
|
this.PointerWheelChanged += (_, e) => this.OnPointerWheelChanged(e); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public event EventHandler<RoutedEventArgs> GotFocus |
|
|
public event EventHandler<RoutedEventArgs> GotFocus |
|
|
|