【发布时间】:2011-08-16 00:59:24
【问题描述】:
我的 xaml 视图文件中有 <TabControl AllowDrop="True" PreviewDragOver="{Binding Path=DragOver}" PreviewDrop="Drop">
DragOver 函数位于 ViewModel.cs 类中。
我收到以下错误
PreviewDragOver="{Binding Path=DragOver}" is not valid. '{Binding Path=DragOver}' is not a valid event handler method name. Only instance methods on the generated or code-behind class are valid.
我尝试绑定到函数的方式有什么问题? 应该怎么样?
【问题讨论】:
标签: .net wpf data-binding mvvm binding