/// <summary> /// Occurs when a touchPoint is Released /// </summary> private void OnTouchUp(object sender, TouchEventArgs e) { #if WINDOWS_PHONE //Workaround for the Touch.FrameReported issue in WP7 not releasing Touch Points TouchHelper.ResetTouchPoints(); #endif if (AreFingersVisible) { #if WINDOWS_PHONE //Workaround: Remove all the Markers in the WP7 version if (_touchPointsMarkers != null) { foreach (var touchPointsMarker in _touchPointsMarkers .Where(touchPointsMarker => touchPointsMarker.Value != null)) { touchPointsMarker.Value.IsOpen = false; } } #else //Hide the TouchPoint if (_touchPointsMarkers.ContainsKey(e.TouchPoint.TouchDevice.Id)) { _touchPointsMarkers[e.TouchPoint.TouchDevice.Id].IsOpen = false; _touchPointsMarkers[e.TouchPoint.TouchDevice.Id] = null; _touchPointsMarkers.Remove(e.TouchPoint.TouchDevice.Id); } #endif } #if DEBUG Debug.WriteLine("TouchPoint Up: Id {0} at ({1})", e.TouchPoint.TouchDevice.Id, e.TouchPoint.Position); #endif }