The recording of the first ever ReactiveUI virtual conference is available on our YouTube Channel.


BindCommandToObject(ICommand?, object?, IObservable<object?>) Method


Bind an ICommand to a UI object, in the "default" way. The meaning of this is dependent on the implementation. Implement this if you have a new type of UI control that doesn't have Command/CommandParameter like WPF or has a non-standard event name for "Invoke".
Containing Type


public IDisposable? BindCommandToObject(ICommand? command, object? target, IObservable<object?> commandParameter)


Name Type Description
command ICommand? The command to bind.
target object? The target object, usually a UI control of some kind.
commandParameter IObservable<object?> An IObservable source whose latest value will be passed as the command parameter to the command. Hosts will always pass a valid IObservable, but this may be Observable.Empty.

Return Value

Type Description
IDisposable? An IDisposable which will disconnect the binding when disposed.