我们在这个项目中使用了 Views 和 ViewModels,因此我们试图在 View 的代码隐藏中尽可能少。
我正在尝试将MouseDoubleClickWPFToolkit 的事件与同一视图中的 a 已经使用DataGrid的相同代码联系起来。Button
Button声明如下:
<Button Content="Select" cmd:ButtonBaseExtensions.Command="{Binding CommandViewEmployer}"/>
这意味着它CommandViewEmployer在 ViewModel 中运行属性。我如何获得Grid MouseDoubleClick运行相同的属性?我试过添加MouseDoubleClick="{Binding CommandViewEmployer}",哪个错误。
我试图在尽可能少的代码隐藏中得到这个,最好没有。