1
我想添加一個處理程序,但只要我的目標是有參數的方法,處理程序就會失敗。這是簡單的代碼:AddHandler是否需要參數?
AddHandler App.Current.RootVisual.MouseLeftButtonUp, RootVisual_MouseLeftButtonUp
Private Sub RootVisual_MouseLeftButtonUp(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
End Sub
這個錯誤不會讓我建立。在看例子時,我做得很對。這是我的錯誤:對於參數的「E」「私人小組 RootVisual_MouseLeftButtonUp(發送者爲對象,E作爲 System.Windows.Input.MouseButtonEventArgs)」未指定
錯誤3參數。 C:\ TFS \ ProjectCollection \ ItemManagementTool \ ItemManagementTool.ClientApplication \查看\ MainMenu.xaml.vb 82 70 ItemManagementTool.ClientApplication
,我收到了類似的錯誤,爲 「發件人」 參數。 任何想法?
,看着就在這,感謝隊友 – Terry
對此表示讚賞問題和答案。以爲我會補充說我最後犯了括號的錯誤,即RootVisual_MouseLeftButtonUp()。當然,它不喜歡那樣,但是直到你看到它,你纔會知道。謝謝! – Alan