ICommand
trait · ferroui-reactiveui · v0.5.0
trait ICommand
A command, executed with a parameter of any type (System.Windows.Input.ICommand).
Deviation (DEVIATIONS.md, ReactiveUI): the parameter object? is Option<&dyn Any>, and the
event CanExecuteChanged is can_execute_changed, which adds a
handler and returns the disposable that removes it.
Members
can_execute
fn can_execute(self: &Self, parameter: Option<&dyn Any>) -> bool
Whether the command can execute with parameter now (CanExecute(object?)).
execute
fn execute(self: &Self, parameter: Option<&dyn Any>)
Executes the command with parameter (Execute(object?)).
can_execute_changed
fn can_execute_changed(self: &Self, handler: Rc<dyn Fn() -> ()>) -> Rc<dyn IDisposable>
Adds handler, which runs when what can_execute answers may have
changed (CanExecuteChanged); disposing the result removes it.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.