예제 #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);
            }

            double left = currentPosition.X - this._initialMousePosition.X + this._initialMouseOffset.X;

            Debug.WriteLine("Adorner Left: " + left);
            double top = currentPosition.Y - this._initialMousePosition.Y + this._initialMouseOffset.Y;

            Debug.WriteLine("Adorner Top: " + top);
            this._draggedAdorner.SetPosition(left, top);
        }
예제 #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);
            }

            double left = currentPosition.X - this._initialMousePosition.X + this._initialMouseOffset.X;
            Debug.WriteLine("Adorner Left: " + left);
            double top = currentPosition.Y - this._initialMousePosition.Y + this._initialMouseOffset.Y;
            Debug.WriteLine("Adorner Top: " + top);
            this._draggedAdorner.SetPosition(left, top);
        }
예제 #4
0
 private void RemoveDraggedAdorner()
 {
     if (this._draggedAdorner != null)
     {
         this._draggedAdorner.Detach();
         this._draggedAdorner = null;
     }
 }