我在XAML视图文件<TabControl AllowDrop="True" PreviewDragOver="{Binding Path=DragOver}" PreviewDrop="Drop">
绑定到一个方法WPF
的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.
有什么错我如何努力绑定到函数的方式吗? 它应该如何?
http://stackoverflow.com/questions/1926176/simple-event-handling -in-mvvm – Will 2011-05-02 12:01:15