Exemplo n.º 1
0
        private void UpdateDragAdornerLocation()
        {
            if (dragAdorner != null)
            {
                Point ptCursor = MouseUtilities.GetMousePosition(ListView);

                double left = ptCursor.X - ptMouseDown.X;

                // The top offset is relative to the item being dragged.
                ListViewItem itemBeingDragged = GetListViewItem(indexToSelect);
                Point        itemLoc          = itemBeingDragged.TranslatePoint(new Point(0, 0), ListView);
                double       top = itemLoc.Y + ptCursor.Y - ptMouseDown.Y;

                dragAdorner.SetOffsets(left, top);
            }
        }