private void OnPointerReleased(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs args) { if (args.Pointer.PointerDeviceType == Windows.Devices.Input.PointerDeviceType.Pen) { return; } // Obtain current point in the coordinate system of the reference element Windows.UI.Input.PointerPoint currentPoint = args.GetCurrentPoint(_reference); // Route the event to the gesture recognizer _gestureRecognizer.ProcessUpEvent(currentPoint); // Release pointer capture on the pointer associated to this event _target.ReleasePointerCapture(args.Pointer); _target.Opacity = 1; // Mark event handled, to prevent execution of default event handlers args.Handled = true; }