Inheritance: System.Windows.Documents.Adorner
Example #1
0
 private void RemoveDraggedAdorner()
 {
     if (draggedAdorner != null)
     {
         draggedAdorner.Detach();
         draggedAdorner = null;
     }
 }
Example #2
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);
        }
Example #3
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);
 }
Example #4
0
 private void RemoveDraggedAdorner()
 {
     if (draggedAdorner != null)
     {
         draggedAdorner.Detach();
         draggedAdorner = null;
     }
 }