BaconographyWP8.View.ScalingPictureView.OnManipulationDelta C# (CSharp) Method

OnManipulationDelta() private method

Handler for the ManipulationDelta event. It may or may not be a pinch. If it is not a pinch, the ViewportControl will take care of it.
private OnManipulationDelta ( object sender, System.Windows.Input.ManipulationDeltaEventArgs e ) : void
sender object
e System.Windows.Input.ManipulationDeltaEventArgs
return void
		void OnManipulationDelta(object sender, ManipulationDeltaEventArgs e)
		{
			if (e.PinchManipulation != null && image != null)
			{
				e.Handled = true;

				if (!_pinching)
				{
					_pinching = true;
					Point center = e.PinchManipulation.Original.Center;
					_relativeMidpoint = new Point(center.X / image.ActualWidth, center.Y / image.ActualHeight);

					var xform = image.TransformToVisual(viewport);
					_screenMidpoint = xform.Transform(center);
				}

				_coercedScale = _scale = _originalScale * e.PinchManipulation.CumulativeScale;

				//CoerceScale(false);
				ResizeImage(false);
			}
			else if (_pinching)
			{
				_pinching = false;
				_originalScale = _scale = _coercedScale;
			}
		}