ICommandBindingAddSource Method

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.

Definition

Namespace: KGySoft.ComponentModel
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
ICommandBinding AddSource(
	Object source,
	string eventName
)

Parameters

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

Return Value

ICommandBinding
This ICommandBinding instance to provide fluent initialization.

See Also