private void border_MouseMove(object sender, MouseEventArgs e)
        {
            UIElement element = sender as UIElement;

            if (element != null && e.LeftButton == MouseButtonState.Pressed)
            {
                //if (this.adorner == null)
                //{
                this.adorner = new TestAdorner(this.border);
                this.adorner.IsHitTestVisible = false;
                //}
                //this.adorner.Visibility = Visibility.Visible;
                if (OnDragStart != null)
                {
                    OnDragStart(this.adorner);
                }
                DataObject data = new DataObject();
                data.SetData("KeymapOutput", this.output);
                data.SetData("KeymapOutputItem", this);
                DragDrop.DoDragDrop(this.border,
                                    data,
                                    DragDropEffects.Copy | DragDropEffects.Move);
                if (OnDragStop != null)
                {
                    OnDragStop(this.adorner);
                }

                //this.adorner.Visibility = Visibility.Hidden;
            }
        }
Beispiel #2
0
        private void dragMe()
        {
            this.adorner = new TestAdorner(this.border);
            this.adorner.IsHitTestVisible = false;
            if (OnDragStart != null)
            {
                OnDragStart(this.adorner);
            }
            DataObject data = new DataObject();

            data.SetData("KeymapOutput", this.output);
            data.SetData("KeymapOutputItem", this);
            DragDrop.DoDragDrop(this.border,
                                data,
                                DragDropEffects.Copy | DragDropEffects.Move);
            if (OnDragStop != null)
            {
                OnDragStop(this.adorner);
            }
        }
        private void border_MouseMove(object sender, MouseEventArgs e)
        {
            UIElement element = sender as UIElement;
            if (element != null && e.LeftButton == MouseButtonState.Pressed)
            {
                //if (this.adorner == null)
                //{
                    this.adorner = new TestAdorner(this.border);
                    this.adorner.IsHitTestVisible = false;
                //}
                //this.adorner.Visibility = Visibility.Visible;
                if (OnDragStart != null)
                {
                    OnDragStart(this.adorner);
                }
                DataObject data = new DataObject();
                data.SetData("KeymapOutput", this.output);
                data.SetData("KeymapOutputItem", this);
                DragDrop.DoDragDrop(this.border,
                                     data,
                                     DragDropEffects.Copy | DragDropEffects.Move);
                if (OnDragStop != null)
                {
                    OnDragStop(this.adorner);
                }

                //this.adorner.Visibility = Visibility.Hidden;
            }
        }
 private void dragMe()
 {
     this.adorner = new TestAdorner(this.border);
     this.adorner.IsHitTestVisible = false;
     if (OnDragStart != null)
     {
         OnDragStart(this.adorner);
     }
     DataObject data = new DataObject();
     data.SetData("KeymapOutput", this.output);
     data.SetData("KeymapOutputItem", this);
     DragDrop.DoDragDrop(this.border,
                          data,
                          DragDropEffects.Copy | DragDropEffects.Move);
     if (OnDragStop != null)
     {
         OnDragStop(this.adorner);
     }
 }