我正在尝试添加一个处理程序,但是一旦我获得一个有参数的方法,处理程序就会失败。以下是简单的代码:
AddHandler App.Current.RootVisual.MouseLeftButtonUp, RootVisual_MouseLeftButtonUp
Private Sub RootVisual_MouseLeftButtonUp(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
End Sub这个错误不会让我构建。在看例子的时候,我做得很对。这是我得到的错误:
Error 3参数没有为“私有子RootVisual_MouseLeftButtonUp(发送方作为对象,e作为System.Windows.Input.MouseButtonEventArgs)”的参数“e”指定。C:\TFS\ProjectCollection\ItemManagementTool\ItemManagementTool.ClientApplication\Views\MainMenu.xaml.vb 82 70 ItemManagementTool.ClientApplication
对于“发件人”参数,我得到了一个类似的错误。有什么想法吗?
发布于 2011-10-31 10:55:28
您缺少了AddressOf关键字
AddHandler App.Current.RootVisual.MouseLeftButtonUp, AddressOf RootVisual_MouseLeftButtonUphttps://stackoverflow.com/questions/7952715
复制相似问题