public override void OnHolding(HoldingRoutedEventArgs e)
{
base.OnHolding(e);
if (e.HoldingState == HoldingState.Started)
{
//如果只画了小于或等于两个点的话,就不执行完成事件。
if (_points == null || _points.Count < 2)
return;
while (_points.Count > _pointsCount)
{
_points.RemoveAt(_points.Count - 2);
}
Point2D item = Map.ScreenToMap(e.GetPosition(Map));
_points.Insert(_points.Count - 1, item);
_pointsCount++;
endDraw(false);
}
}
private void endDraw(bool isCancel = false)