Beispiel #1
0
        public static PointerState _(Windows.UI.Xaml.Input.ManipulationInertiaStartingRoutedEventArgs e, object sender, string remarks)
        {
            var ret = new PointerState
            {
                Sender      = sender,
                Remarks     = remarks,
                IsInContact = true,
                Scale       = e.Cumulative.Scale,
                Rotation    = Angle.FromDeg(e.Cumulative.Rotation),
                Time        = DateTime.Now,
            };

            switch (e.PointerDeviceType)
            {
            case PointerDeviceType.Pen:
                ret.DeviceType = PointerState.DeviceTypes.Pen;
                break;

            case PointerDeviceType.Touch:
                ret.DeviceType = PointerState.DeviceTypes.Touch;
                break;

            case PointerDeviceType.Mouse:
                ret.DeviceType = PointerState.DeviceTypes.Mouse;
                break;
            }
            return(ret);
        }
Beispiel #2
0
 private static void FrameworkElement_ManipulationInertiaStarting(object sender, Windows.UI.Xaml.Input.ManipulationInertiaStartingRoutedEventArgs e)
 {
     if (PointerDeviceType.Touch.Equals(e.PointerDeviceType))
     {
         System.Diagnostics.Debug.WriteLine($"ManipulationInertiaStarting");
     }
 }