Skip to main content

Module command_binding

Module command_binding 

Source
Expand description

CommandBinding (ReactiveUI.Binding): the execution of commands from observables (CommandInvoker) and the binding of commands to controls (CommandBinderService, with the binders CreatesCommandBindingViaEvent and CreatesCommandBindingViaCommandParameter).

Structs§

CommandBinderService
Finds the ICreatesCommandBinding with the highest affinity for a type of control (CommandBinderService), as the property observation finds its observer.
CommandInvoker
Executes a command with each value of an observable as its parameter, skipping a value the command cannot execute (CommandInvoker).
CreatesCommandBindingViaCommandParameter
Binds a command to a control of type C that has a Command and a CommandParameter property (CreatesCommandBindingViaCommandParameter): the binding assigns the parameter, then the command, and disposing it restores the values the control had.
CreatesCommandBindingViaEvent
Binds a command to an event of a control of type C (CreatesCommandBindingViaEvent): executed with the latest command parameter each time the event is raised, if the command can execute with it.

Constants§

DEFAULT_COMMAND_EVENTS
The names of the events a control raises when it is used, in order of preference, which a command binds to when no event is named (defaultEventsToBind).

Functions§

bind_command_to_event
Executes command with the latest value of command_parameter whenever the event that subscribe adds a handler to is raised, if the command can execute with it; disposing the result removes the handler and ends the subscription of the parameter.
control_event
A subscription to the event that event reads from a control.

Type Aliases§

ControlEventSubscription
Adds a handler to an event of a control of type C; disposing the result removes it.