private void OnWindowScrollEvent(object o, ScrollEventArgs args) { try { if (args.Event.Direction == ScrollDirection.Smooth) { var properties = BuildProperties(args.Event); var modifiers = GetKeyModifiers(); _ownerEvents.RaisePointerWheelChanged( 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 PointerExited", e); } }
private void Window_ScrollEvent(object o, ScrollEventArgs args) { try { _ownerEvents.RaisePointerWheelChanged( 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 PointerExited", e); } }