VB Silverlight的窗户电话“把手子句要求或在含有式定义的WithEvents变量它的基类

2019-09-17 06:58发布

当我从文件名为.xaml选择按钮,然后从右侧挖掘事件(以设定的抽头事件),它自动生成这样子:

Private Sub btn(ByRef sender As Object, e As System.Windows.RoutedEventArgs) Handles btn.Tap

End Sub

但它也有这样的错误:

错误1 Handles子句需要在包含类型或它的基类型之一定义的WithEvents变量。

有什么建议么? 谢谢!

Answer 1:

Public WithEvents btn As Button的正上方子为了送走的bug!



文章来源: VB silverlight for windows phone “Handles clause requires a WithEvents variable defined in the containing type or one of its base types”