예제 #1
0
 private void RemoveDraggedAdorner()
 {
     if (this.draggedAdorner != null)
     {
         this.draggedAdorner.Detach();
         this.draggedAdorner = null;
     }
 }
예제 #2
0
        // Adorners

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