See the Remarks section for details.
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.4.0
public interface ICommandBinding : IDisposable
Public Interface ICommandBinding Inherits IDisposable
public interface class ICommandBinding : IDisposable
type ICommandBinding = interface interface IDisposable end
Thetype exposes the following members.
Gets whether thisinstance is disposed.
Gets a copy of the sources of thisalong with the bound event names.
Gets a copy of the state updaters of this.
Gets a copy of the targets of this.
Adds a target getter function to this ICommand executes it will evaluate the specified getter delegate.instance. Whenever the underlying
Adds the target to this ICommand will be invoked for each added target. If no targets are added the command will be invoked with a target.instance. The underlying
Invokes the underlying ICommand for all of the added targets using the specified source, event name, event arguments and parameters.
Removes the specified source from this instance. The used events of the removed source will be released.
Removes the specified state updater. The removed updater will not be disposed.
Removes the specified target from this instance.
Occurs when the associated ICommand has been executed.
Whereas an ICommand is a static logic without state, the created binding is a dynamic entity: it has a state, which can store variable elements (see ICommandState), and has sources and targets, which can be added and removed during the lifetime of the binding.
The binding should be disposed when it is not used anymore so it releases the events it used internally. If more bindings are used it is recommended to create them by a CommandBindingsCollection instance so when it is disposed it releases all of the added bindings at once.
|See the Remarks section of the ICommand interface for details and examples about commands.|