Command that implements ICommand and accepts delegates that contain the command implementation.
More...
|
| | DelegatingCommand (Action< object > execute) |
| | Creates a new command object that can always execute. More...
|
| |
| | DelegatingCommand (Action< object > execute, ViewModelBase viewModel) |
| | Creates a new command object that knows the view model that it belongs to. More...
|
| |
| | DelegatingCommand (Action< object > execute, Predicate< object > canExecute) |
| | Creates a new command object whose executable state is determined by the canExecute method. More...
|
| |
| | DelegatingCommand (Action< object > execute, Predicate< object > canExecute, ViewModelBase viewModel) |
| | Creates a new command object whose executable state is determined by the canExecute method and that know the view model that it belongs to. More...
|
| |
|
bool | CanExecute (object parameter) |
| |
|
void | Execute (object parameter) |
| |
| DelegatingCommand | ListenOn (string propertyName) |
| | Makes DelegateCommnand listen on PropertyChanged events of some object, so that DelegateCommnand can update its IsEnabled property. More...
|
| |
|
|
virtual void | OnCanExecuteChanged () |
| |
|
|
EventHandler | CanExecuteChanged |
| |
Command that implements ICommand and accepts delegates that contain the command implementation.
Based on Josh Smith's article in MSDN Magazine, http://msdn.microsoft.com/en-us/magazine/dd419663.aspx. ListenOn method inspired by http://stackoverflow.com/a/1857619/270712 by Tomas Kafka http://stackoverflow.com/users/38729/tom%C3%A1%C5%A1-kafka (CC BY-SA 3.0)
Definition at line 38 of file DelegatingCommand.cs.
| Bovender.Mvvm.DelegatingCommand.DelegatingCommand |
( |
Action< object > |
execute | ) |
|
|
inline |
Creates a new command object that can always execute.
- Parameters
-
| execute | Code that will be executed. |
Definition at line 46 of file DelegatingCommand.cs.
| Bovender.Mvvm.DelegatingCommand.DelegatingCommand |
( |
Action< object > |
execute, |
|
|
ViewModelBase |
viewModel |
|
) |
| |
|
inline |
Creates a new command object that knows the view model that it belongs to.
- Parameters
-
| execute | Execute method. |
| viewModel | View model that this command belongs to. |
Definition at line 56 of file DelegatingCommand.cs.
| Bovender.Mvvm.DelegatingCommand.DelegatingCommand |
( |
Action< object > |
execute, |
|
|
Predicate< object > |
canExecute |
|
) |
| |
|
inline |
Creates a new command object whose executable state is determined by the canExecute method.
- Parameters
-
| execute | Execute method. |
| canExecute | Function that determines whether the command can be executed or not. |
Definition at line 69 of file DelegatingCommand.cs.
| Bovender.Mvvm.DelegatingCommand.DelegatingCommand |
( |
Action< object > |
execute, |
|
|
Predicate< object > |
canExecute, |
|
|
ViewModelBase |
viewModel |
|
) |
| |
|
inline |
Creates a new command object whose executable state is determined by the canExecute method and that know the view model that it belongs to.
- Parameters
-
| execute | Execute method. |
| canExecute | Function that determines whether the command can be executed or not. |
| viewModel | View model that this command belongs to. |
Definition at line 87 of file DelegatingCommand.cs.
Makes DelegateCommnand listen on PropertyChanged events of some object, so that DelegateCommnand can update its IsEnabled property.
Definition at line 142 of file DelegatingCommand.cs.
The documentation for this class was generated from the following file: