C# Class SoftwareKobo.UniversalToolkit.Mvvm.DelegateCommand

委托命令。
Inheritance: ICommand
Mostrar archivo Open project: h82258652/SoftwareKobo.UniversalToolkit

Public Methods

Method Description
CanExecute ( object parameter ) : bool

指示当前状态是否允许命令执行。

DelegateCommand ( System.Action execute ) : System

初始化委托命令。

DelegateCommand ( System.Action execute, Func canExecute ) : System

初始化委托命令。

DelegateCommand ( Func asyncExecute ) : System

初始化委托命令。

DelegateCommand ( Func asyncExecute, Func canExecute ) : System

初始化委托命令。

Execute ( object parameter ) : void

执行命令。

RaiseCanExecuteChanged ( ) : void

通知命令是否允许执行发生变更。

Method Details

CanExecute() public method

指示当前状态是否允许命令执行。
public CanExecute ( object parameter ) : bool
parameter object 参数。
return bool

DelegateCommand() public method

初始化委托命令。
public DelegateCommand ( System.Action execute ) : System
execute System.Action 命令动作。
return System

DelegateCommand() public method

初始化委托命令。
public DelegateCommand ( System.Action execute, Func canExecute ) : System
execute System.Action 命令动作。
canExecute Func 指示命令在某个状态下是否能够执行。
return System

DelegateCommand() public method

初始化委托命令。
public DelegateCommand ( Func asyncExecute ) : System
asyncExecute Func 命令动作。
return System

DelegateCommand() public method

初始化委托命令。
public DelegateCommand ( Func asyncExecute, Func canExecute ) : System
asyncExecute Func 命令动作。
canExecute Func 指示命令在某个状态下是否能够执行。
return System

Execute() public method

执行命令。
public Execute ( object parameter ) : void
parameter object 参数。
return void

RaiseCanExecuteChanged() public method

通知命令是否允许执行发生变更。
public RaiseCanExecuteChanged ( ) : void
return void