KGy SOFT

ICommandBindingAddSource Method

KGy SOFT Core Libraries Help
Adds a source to this ICommandBinding instance. For static events pass a Type as source. If state updaters were added to the binding by the AddStateUpdater method, then the State entries will be applied to the new source. At least one source has to be added to the binding to be able to invoke the underlying ICommand.

Namespace:  KGySoft.ComponentModel
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.3.0
Syntax

ICommandBinding AddSource(
	Object source,
	string eventName
)

Parameters

source
Type: SystemObject
The new source to add. Can be a Type for static events.
eventName
Type: SystemString
The name of the event on the source, which will trigger the underlying ICommand.

Return Value

Type: ICommandBinding
This ICommandBinding instance to provide fluent initialization.
See Also

Reference