private void CleanUpData() { _initialPosition = null; _draggedData = null; _insertionAdorner?.Detach(); _dragContentAdorner?.Detach(); _insertionAdorner = null; _draggedItemIndex = null; }
private void CreateInsertionAdorner(DependencyObject draggedItem, ItemsControl itemsControl) { var draggedOveredContainer = itemsControl.GetItemContainer(draggedItem); bool showInRight = false; if (draggedOveredContainer == null) { draggedOveredContainer = itemsControl.GetLastContainer(); showInRight = true; } _insertionAdorner?.Detach(); _insertionAdorner = new InsertionAdorner(draggedOveredContainer, showInRight); }
private void CreanUpInsertionAdorner() { _insertionAdorner.Detach(); _insertionAdorner = null; }