private void AddSelectionAdorner() { if (!adornerAdded) { selectionAdorner = new RectangleSelectionAdorner(this); selectionAdorner.Border = zoomRect; adornerLayer.Add(selectionAdorner); } adornerAdded = true; }
private void AddSelectionAdorner() { if (!adornerAdded) { AdornerLayer layer = AdornerLayer; if (layer != null) { selectionAdorner = new RectangleSelectionAdorner(this) { Border = zoomRect }; layer.Add(selectionAdorner); adornerAdded = true; } } }