我找到了一个C#类ActionCommand,它实现了ICommand并基于Execute和CanExecute的委托(delegate)。到目前为止对我来说看起来很完美。publicclassActionCommand:ICommand{privatereadonlyAction_executeHandler;privatereadonlyFunc_canExecuteHandler;publicActionCommand(Actionexecute,FunccanExecute){if(execute==null)thrownewArgumentNullException("Exe