public override void Deactivate()
{
isActivated = false;
isDrawing = false;
polygon = null;
points = null;
startPoint = Point2D.Empty;
if (DrawLayer != null)
{
DrawLayer.Children.Clear();
}
if (Map != null && Map.Layers != null)
{
Map.Layers.Remove(DrawLayer);
}
}