esri:Editor.SnapDistance="20" esri:Editor.SnapKey="S"
private void GraphicsLayer_MouseLeftButtonDown(object sender, GraphicMouseButtonEventArgs e) { Polyline polyline = e.Graphic.Geometry as Polyline; Envelope current = polyline.Extent; Envelope expand = current.Expand(10); Polyline scaled = new Polyline(); double sx = current.Width > 0 ? expand.Width / current.Width : 1d; double sy = current.Height > 0 ? expand.Height / current.Height : 1d; foreach (var path in polyline.Paths) { PointCollection pts = new PointCollection(); foreach (var p in path) pts.Add(new MapPoint((p.X - current.XMin) * sx + expand.XMin, (p.Y - current.YMin) * sy + expand.YMin)); scaled.Paths.Add(pts); } e.Graphic.Geometry = scaled; }