DelegateCommand
Ecng.ComponentModel
Delegate command capable of taking argument.
继承自: Disposable
实现: IRevalidatableCommand, ICommand
构造函数
DelegateCommand
public DelegateCommand(Action<T> execute, Func<T, bool> canExecute)
delegateCommand = DelegateCommand(execute, canExecute)
Creates a new command with conditional execution.
- execute
- The execution logic.
- canExecute
- The execution status logic.
方法
DisposeManaged
protected override void DisposeManaged()
delegateCommand.DisposeManaged()
Disposes the managed resources. Override this method to add custom clean up of managed resources.
RaiseCanExecuteChanged
public void RaiseCanExecuteChanged()
delegateCommand.RaiseCanExecuteChanged()
Invoke CanExecuteChanged event.
事件
CanExecuteChanged
public event EventHandler CanExecuteChanged
delegateCommand.CanExecuteChanged += handler