private void OnTapStart(GestureLayer.TapData data) { try { var properties = BuildProperties(true, false); var modifiers = VirtualKeyModifiers.None; var point = GetPoint(data.X, data.Y); _ownerEvents.RaisePointerPressed( new PointerEventArgs( new Windows.UI.Input.PointerPoint( frameId: GetNextFrameId(), timestamp: (uint)data.Timestamp, device: PointerDevice.For(PointerDeviceType.Touch), pointerId: 0, rawPosition: point, position: point, isInContact: properties.HasPressedButton, properties: properties ), modifiers ) ); } catch (Exception e) { this.Log().Error("Failed to raise PointerPressed", e); } }
private void OnWindowButtonPressEvent(object o, ButtonPressEventArgs args) { try { var properties = BuildProperties(args.Event); var modifiers = GetKeyModifiers(); _ownerEvents.RaisePointerPressed( new PointerEventArgs( new Windows.UI.Input.PointerPoint( frameId: GetNextFrameId(), timestamp: args.Event.Time, device: PointerDevice.For(PointerDeviceType.Mouse), pointerId: 0, rawPosition: new Windows.Foundation.Point(args.Event.X, args.Event.Y), position: new Windows.Foundation.Point(args.Event.X, args.Event.Y), isInContact: true, properties: properties ), modifiers ) ); } catch (Exception e) { this.Log().Error("Failed to raise PointerPressed", e); } }
private void Window_ButtonPressEvent(object o, ButtonPressEventArgs args) { try { _ownerEvents.RaisePointerPressed( new PointerEventArgs( new Windows.UI.Input.PointerPoint( frameId: 0, timestamp: args.Event.Time, device: PointerDevice.For(PointerDeviceType.Mouse), pointerId: 0, rawPosition: new Windows.Foundation.Point(args.Event.X, args.Event.Y), position: new Windows.Foundation.Point(args.Event.X, args.Event.Y), isInContact: false, properties: BuildProperties(args.Event) ) ) ); } catch (Exception e) { this.Log().Error("Failed to raise PointerPressed", e); } }