如何用ReactiveUI命令等效地执行此操作? 并特别处理与IObservable等效的CanExecute吗?
private readonly bool enableEdit = ctor-param;
this.AddIdCommand = new DelegateCommand(AddIdExecute, ()=>enableEdit);
答案 0 :(得分:0)
如果值是静态的,则应这样做:
this.AddIdCommand = ReactiveCommand.Create(AddIdExecute, Observable.Return(enableEdit));