private void RemoveAdorner() { if (currentAdorner != null) { if (currentAdorner.ElementContainerControl != null && currentAdorner.ElementContainerControl.Element != null) { currentAdorner.ElementContainerControl.Element.Deleted -= AdornedElementDeleted; } currentAdorner.Dispose(); currentAdorner = null; } }