SetPosition() public méthode

public SetPosition ( double left, double top ) : void
left double
top double
Résultat void
Exemple #1
0
        // Adorners

        // Creates or updates the dragged Adorner.
        private void ShowDraggedAdorner(Point currentPosition)
        {
            if (draggedAdorner == null)
            {
                AdornerLayer adornerLayer = AdornerLayer.GetAdornerLayer(sourceItemsControl);
                draggedAdorner = new DraggedAdorner(draggedData, GetDragDropTemplate(sourceItemsControl),
                                                    sourceItemContainer,
                                                    adornerLayer);
            }
            draggedAdorner.SetPosition(currentPosition.X - initialMousePosition.X + initialMouseOffset.X,
                                       currentPosition.Y - initialMousePosition.Y + initialMouseOffset.Y);
        }