ICommandSource Interface
Definition
An interface for classes that know how to invoke a Command.
public interface ICommandSource
Methods
| Name | Description |
|---|---|
| CanExecuteChanged | Called for the CanExecuteChanged event when changes are detected. |
CanExecuteChanged Method
Called for the CanExecuteChanged event when changes are detected.
public void CanExecuteChanged(object sender, EventArgs e)
Parameters
sender object
The event sender.
e EventArgs
The event args.
Properties
| Name | Description |
|---|---|
| Command | The command that will be executed when the class is "invoked." Classes that implement this interface should enable or disable based on the command's CanExecute return value. The property may be implemented as read-write if desired. |
| CommandParameter | The parameter that will be passed to the command when executing the command. The property may be implemented as read-write if desired. |
| IsEffectivelyEnabled | Gets a value indicating whether this control and all its parents are enabled. |
Command Property
The command that will be executed when the class is "invoked." Classes that implement this interface should enable or disable based on the command's CanExecute return value. The property may be implemented as read-write if desired.
public System.Windows.Input.ICommand Command { get; set; }
CommandParameter Property
The parameter that will be passed to the command when executing the command. The property may be implemented as read-write if desired.
public object CommandParameter { get; set; }
IsEffectivelyEnabled Property
Gets a value indicating whether this control and all its parents are enabled.
public bool IsEffectivelyEnabled { get; set; }