CommandBindingsCollectionAdd(ICommand, Object, String, Object) Method
Creates a binding for a
command using the specified
source,
eventName and
targets.
The created binding will be added to this
CommandBindingsCollection.
Namespace: KGySoft.ComponentModelAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
public ICommandBinding Add(
ICommand command,
Object source,
string eventName,
params Object[]? targets
)
Public Function Add (
command As ICommand,
source As Object,
eventName As String,
ParamArray targets As Object()
) As ICommandBinding
public:
ICommandBinding^ Add(
ICommand^ command,
Object^ source,
String^ eventName,
... array<Object^>^ targets
)
member Add :
command : ICommand *
source : Object *
eventName : string *
targets : Object[] -> ICommandBinding
- command ICommand
- The command to bind.
- source Object
- The source, which can trigger the command. Can be a Type for static events.
- eventName String
- The name of the event on the source that can trigger the command.
- targets Object
- Zero or more targets for the binding.
ICommandBindingAn
ICommandBinding instance, to which the specified
source and
targets are bound.