コード例 #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);
        }
コード例 #3
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);
 }
コード例 #4
0
 private void RemoveDraggedAdorner()
 {
     if (this.draggedAdorner != null)
     {
         this.draggedAdorner.Detach();
         this.draggedAdorner = null;
     }
 }