private void OnTapEnd(GestureLayer.TapData data)
        {
            try
            {
                var properties = BuildProperties(false, false);
                var modifiers  = VirtualKeyModifiers.None;
                var point      = GetPoint(data.X, data.Y);

                _ownerEvents.RaisePointerReleased(
                    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 PointerReleased", e);
            }
        }
Пример #2
0
        private void OnWindowButtonReleaseEvent(object o, ButtonReleaseEventArgs args)
        {
            try
            {
                var properties = BuildProperties(args.Event);
                var modifiers  = GetKeyModifiers();

                _ownerEvents.RaisePointerReleased(
                    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: properties.HasPressedButton,
                            properties: properties
                            ),
                        modifiers
                        )
                    );
            }
            catch (Exception e)
            {
                this.Log().Error("Failed to raise PointerReleased", e);
            }
        }
Пример #3
0
 private void Window_ButtonReleaseEvent(object o, ButtonReleaseEventArgs args)
 {
     try
     {
         _ownerEvents.RaisePointerReleased(
             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 PointerReleased", e);
     }
 }