An implementation of ICommand that uses delegates for the execute and can-execute logic, without accepting a command parameter. This class is typically generated by the CommandAttribute aspect.
Namespace: Metalama.Patterns.Wpf
Assembly: Metalama.Patterns.Wpf.dll
Syntax
public sealed class DelegateCommand : BaseDelegateCommand, ICommand, INotifyPropertyChangedRemarks
This class implements INotifyPropertyChanged to notify when CanExecute changes.
When integrated with an INotifyPropertyChanged implementation for the CanExecute property,
the CanExecuteChanged event is automatically raised.
Properties
| Name | Description |
|---|---|
| CanExecute | Gets a value indicating whether the command can be executed.
Returns |
Methods
| Name | Description |
|---|---|
| Execute() | Executes the command by invoking the execute delegate. |
| Execute(object?) | Executes the command. This overload is obsolete because this command type does not accept parameters. |
Events
| Name | Description |
|---|---|
| PropertyChanged |