我开始在我的应用程序中使用MVVM模式,我有ListView
,并且想替换:
<ListView>
<ListViewItem PreviewMouseDown="Choose_PreviewMouseDown"/>
</ListView>
类似:
<ListView>
<ListViewItem PreviewMouseDown="{Binding PreviewMouseDownCommand}"/>
</ListView>
但是它说:'PreviewMouseDownCommand' is not a method
更新