我的CanExecute方法在加载窗口和网格中的每一项时都会触发,即使我没有单击复选框。我以一个消息框对话框循环来结束。 如果焦点没有丢失,它似乎不会经常触发,但在我单击一个框之前,它仍然会触发。我使用的是来自Microsoft.VisualStudio.Utilities的DelegateCommand。DataGridTemplateColumn> </DataGrid> 和视图模型: Public Property Che
我的ViewModel中有一个CanLoginExecute()方法,但它只在应用程序启动时触发,然后再也不会触发。因此,Login按钮永远不会启用。我遗漏了什么?INotifyPropertyChanged public LoginViewModel() this.LoginCommand =
new DelegateCommand