private void StartDrag() { if (_panelAdorner != null || _dragedChild == null) { return; } RootAdornerLayer.Add(GetPanelAdorner(AssociatedObject, _dragedChild)); _dragedChild.Opacity = 0; DragDrop.AddQueryContinueDragHandler(AssociatedObject, OnQueryContinueDrag); DragDrop.DoDragDrop(AssociatedObject, _dragedChild, DragDropEffects.Move); DragDrop.RemoveQueryContinueDragHandler(AssociatedObject, OnQueryContinueDrag); EndDrag(); }
private void StartDrag() { if (_elementAdorner != null) { return; } RootAdornerLayer.Add(ElementAdorner); AssociatedObject.Opacity = _hiddenWhileDragging ? 0 : 1; DragDrop.AddQueryContinueDragHandler(AssociatedObject, OnQueryContinueDrag); DragDrop.DoDragDrop(AssociatedObject, AssociatedObject, DragDropEffects.Move); DragDrop.RemoveQueryContinueDragHandler(AssociatedObject, OnQueryContinueDrag); EndDrag(); }