Struct CommandSourceStruct
Helper structure that contains command and parameter. It can be used as a field in classes that need Command and CommandParameter properties in order to reuse the common functionality.
public struct CommandSourceStruct : ICommandSource
- Implements
Constructors
- CommandSourceStruct(object)
Initializes a new instance of the CommandSourceStruct struct.
Fields
- Changed
Occurs when Command is changed or CanExecute(object?) is changed.
Properties
- CanExecute
Gets whether command can be executed.
- Command
Gets the parameter that will be passed to the command when executing it.
- CommandParameter
Gets the parameter that will be passed to the command when executing it.
- CommandTarget
Get or sets target object where the command should be raised.
Methods
- CanExecuteCommandSource(ICommandSource)
Gets whether
commandSource
can be executed.
- Execute()
Executes command if it is specified.
- ExecuteCommandSource(ICommandSource)
Executes command specified with ICommandSource