问题
When I am selecting a button from the .xaml file and then tap event from the right (in order to set the tap event) it auto generates this sub:
Private Sub btn(ByRef sender As Object, e As System.Windows.RoutedEventArgs) Handles btn.Tap
End Sub
But it also has this error:
Error 1 Handles clause requires a WithEvents variable defined in the containing type or one of its base types.
Any suggestions? Thank you!
回答1:
Public WithEvents btn As Button
just above the sub in order to send away the bug !
来源:https://stackoverflow.com/questions/10615710/vb-silverlight-for-windows-phone-handles-clause-requires-a-withevents-variable