【发布时间】:2014-09-09 12:22:07
【问题描述】:
我正在编写我的第一个代码来处理 WPF / VB.Net 中的拖放事件。
作为一个学习练习,我试图在左键按下按钮控件时启动 DoDragDrop。我认为这将实现如下:
Private Sub ButtonYield_MouseMove(sender As Object, e As MouseEventArgs) Handles ButtonYield.MouseMove
If e.LeftButton = MouseButtonState.Pressed Then
'Drag Drop Code Here
MsgBox("Event Called")
End If
End Sub
但实际上,只有在鼠标移到按钮控件上方之前按下左键时才会调用此事件。
我在这里缺少一些基本的东西吗?
提前致谢!
【问题讨论】: