DoDragDrop disables MouseMove Events

后端 未结 2 1799
失恋的感觉
失恋的感觉 2021-01-01 22:05

After having started a Drag & Drop operation by DragDrop.DoDragDrop(...) no more MouseMove Events are fired. I even tried

AddHandler(Window.MouseMoveEven         


        
相关标签:
2条回答
  • 2021-01-01 22:45

    What is the DragDrop.DoDragDrop construction? DoDragDrop is intended to be called in MouseDown/MouseMove method indeed, not in DragDrop. It is supposed to START handling the procedure, not to react for the drop (the desired effect of the drop you just implement directly in DragDrop). MouseMove never fires while already dragging, perhaps that's why it does not also fire with you, since you set the procedure. I think you handle this wrong way, here is one of examples http://msdn.microsoft.com/en-us/library/aa984430%28v=vs.71%29.aspx.

    0 讨论(0)
  • 2021-01-01 22:58

    You need to handle the DragOver event.

    EDIT: Try handling the GiveFeedback event on the control that you called DoDragDrop on; that might do what you're looking for.

    0 讨论(0)
提交回复
热议问题