private void Activate(Point2D item)
{
if (Map == null || Map.Layers == null)
{
return;
}
DrawLayer = new ElementsLayer();
Map.Layers.Add(DrawLayer);
rectangle = new Rectangle();
rectangle.Stroke = this.Stroke;
rectangle.StrokeThickness = this.StrokeThickness;
rectangle.StrokeMiterLimit = this.StrokeMiterLimit;
rectangle.StrokeDashOffset = this.StrokeDashOffset;
rectangle.StrokeDashArray = this.StrokeDashArray;
rectangle.StrokeDashCap = this.StrokeDashCap;
rectangle.StrokeEndLineCap = this.StrokeEndLineCap;
rectangle.StrokeLineJoin = this.StrokeLineJoin;
rectangle.StrokeStartLineCap = this.StrokeStartLineCap;
rectangle.Opacity = this.Opacity;
rectangle.Fill = this.Fill;
rectangle.SetValue(ElementsLayer.BBoxProperty , new Rectangle2D(item , item));
DrawLayer.Children.Add(rectangle);
isActivated = true;
isDrawing = true;
}