private static void Element_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            if (_adorner is null)
            {
                return;
            }

            _adorner.AdornedElement.ReleaseMouseCapture();
            _adorner.Detach();
            _adorner = null;
        }
        private static void Element_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (sender is not FrameworkElement adornedElement)
            {
                return;
            }

            var parent = e.OriginalSource is FrameworkElement originalElement
                ? FindAncestor <Panel>(originalElement) : null;

            if (parent is null)
            {
                return;
            }

            var pt     = e.GetPosition(adornedElement);
            var offset = new Point(-pt.X, -pt.Y);

            _adorner = new GhostAdorner(parent, adornedElement, pt, offset);

            adornedElement.CaptureMouse();
        }