protected override void OnManipulationDelta(ManipulationDeltaEventArgs e)
{
base.OnManipulationDelta(e);
//if (this.Action != null)
//{
// this.Action.OnManipulationDelta(e);
//}
Point scale = new Point(Math.Abs(e.DeltaManipulation.Scale.X), Math.Abs(e.DeltaManipulation.Scale.Y));
_center = e.ManipulationContainer.TransformToVisual(this).Transform(e.ManipulationOrigin);
_centerP = ScreenToMap(_center);
if (IsPinchOrStretch(scale))
{
double num = (scale.X + scale.Y) / 2;
oldResolution = this.mapResolution;
double newResolution = this.mapResolution / num;
newResolution = MathUtil.MinMaxCheck(newResolution, MinResolution, MaxResolution);
num = this.mapResolution / newResolution;
double num1 = _center.X - currentSize.Width / 2;
double num2 = _center.Y - currentSize.Height / 2;
ZoomToResolution(newResolution, new Point2D(_centerP.X - newResolution * num1, _centerP.Y + newResolution * num2), true);
}
else
{
this.PanHelper.DeltaPan(Convert.ToInt32(e.DeltaManipulation.Translation.X), Convert.ToInt32(e.DeltaManipulation.Translation.Y), this.PanDuration, true);
}
}