Ejemplo n.º 1
0
        /* ____________________________________________________________________
         *		Utility functions
         * ____________________________________________________________________
         */

        private static void CreatePreviewAdorner(UIElement adornedElt, IDataObject data)
        {
            if (_overlayElt != null)
            {
                return;
            }

            AdornerLayer layer      = AdornerLayer.GetAdornerLayer(CurrentDropTargetAdvisor.GetTopContainer());
            UIElement    feedbackUI = CurrentDropTargetAdvisor.GetVisualFeedback(data);

            _overlayElt = new DropPreviewAdorner(feedbackUI, adornedElt);
            PositionAdorner();
            layer.Add(_overlayElt);
        }
Ejemplo n.º 2
0
        /* ____________________________________________________________________
         *		Utility functions
         * ____________________________________________________________________
         */
        private static void CreatePreviewAdorner(UIElement adornedElt, IDataObject data)
        {
            if (_overlayElt != null)
            {
                return;
            }

            AdornerLayer layer = AdornerLayer.GetAdornerLayer(CurrentDropTargetAdvisor.GetTopContainer());
            UIElement feedbackUI = CurrentDropTargetAdvisor.GetVisualFeedback(data);
            _overlayElt = new DropPreviewAdorner(feedbackUI, adornedElt);
            PositionAdorner();
            layer.Add(_overlayElt);
        }
Ejemplo n.º 3
0
 private static void RemovePreviewAdorner()
 {
     if (_overlayElt != null)
     {
         AdornerLayer.GetAdornerLayer(CurrentDropTargetAdvisor.GetTopContainer()).Remove(_overlayElt);
         _overlayElt = null;
     }
 }