public GisEditorEditInteractiveOverlay() : base() { newFeatureIds = new Collection <string>(); snappingLayers = new ObservableCollection <FeatureLayer>(); snappingLayers.CollectionChanged += (s, e) => { if (e.Action == NotifyCollectionChangedAction.Add && ParentMap != null) { ParentMap.Refresh(this); } }; editSnapshots = new Collection <EditSnapshot>(); OverlayCanvas.SetValue(Canvas.ZIndexProperty, editOverlayZIndex); editShapesLayer = new InMemoryFeatureLayer(); associateControlPointsLayer = new InMemoryFeatureLayer(); reshapeControlPointsLayer = new InMemoryFeatureLayer(); snappingPointsLayer = new InMemoryFeatureLayer(); snappingToleranceLayer = new InMemoryFeatureLayer(); editsInProcessSimpleCandidate = new Collection <SimpleCandidate>(); editCandidatesLayer = new InMemoryFeatureLayer(); translateTransform = new TranslateTransform(); OverlayCanvas.RenderTransform = translateTransform; RenderMode = RenderMode.DrawingVisual; CanRotate = true; CanResize = true; SetDefaultStyle(); tile = GetLayerTile(); OverlayCanvas.Children.Add(tile); SnappingDistance = 10; SnappingDistanceUnit = SnappingDistanceUnit.Pixel; if (Application.Current != null && Application.Current.MainWindow != null) { Application.Current.MainWindow.KeyDown += new System.Windows.Input.KeyEventHandler(MainWindow_KeyDown); } TakeSnapshot(); }