void Control_Hold(object sender, System.Windows.Input.GestureEventArgs e) { FrameworkElement control = sender as FrameworkElement; GestureRenderer renderer = control.Parent as GestureRenderer; Element element = renderer.Element; Console.WriteLine("Control_Hold [" + control.Name + "] " + e.GetPosition(control).ToString()); if (GestureMonitor != null) { GestureMonitor.RaiseEvent(element, new GestureMonitorEventArgs(element, GestureType.Hold)); } }
void Control_ManipulationCompleted(object sender, System.Windows.Input.ManipulationCompletedEventArgs e) { if (e.IsInertial) { FrameworkElement control = sender as FrameworkElement; GestureRenderer renderer = control.Parent as GestureRenderer; Element element = renderer.Element; Console.WriteLine("Control_ManipulationCompleted [" + control.Name + "] " + e.IsInertial); if (GestureMonitor != null) { GestureMonitor.RaiseEvent(element, new GestureMonitorEventArgs(element, GestureType.Swipe)); } } }