private void RemoveAdorner() { if (_adorner is null || _adornerLayer is null) { return; } if (_adornerDragDrop != null) { ControlAdornerDragDrop.Detach(_adornerDragDrop); _adornerDragDrop = null; } if (_adornerResizing != null) { ResizingAdorner.Detach(_adornerResizing); _adornerResizing = null; } _adornerLayer.Remove(_adorner); _adorner.Child = null; _adorner = null; _adornerLayer = null; RegisterBeingMovedOut(); }
private void UpdateResizingAdorner() { if (IsOpen && (ResizeMode == ResizeMode.CanResize || ResizeMode == ResizeMode.CanResizeWithGrip)) { if (_adornerResizing == null && _adorner != null) { _adornerResizing = ResizingAdorner.Attach(this); } } else { if (_adornerResizing != null) { ResizingAdorner.Detach(_adornerResizing); _adornerResizing = null; } } }