DelegateCommand
wpf prism 自定义委托命令DelegateCommand
//构造函数 public MainWindowViewModel() { EditCommand = new DelegateCommand(_editCommand); } //命令声明一 public DelegateCommand EditCommand { get; set; } //构造 ......
DelegateCommand-最简单的合令调用。
View代码 <StackPanel> <Button Content="方法一" Command="{Binding AddCommand}"></Button> </StackPanel> ViewModel代码 1 public DelegateCommand? AddCommand 2 { ......