FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    can_execute

    fn can_execute(self: &Self, parameter: Option<&dyn Any>) -> bool
    

    Whether the command can execute with parameter now (CanExecute(object?)).

    Source

    execute

    fn execute(self: &Self, parameter: Option<&dyn Any>)
    

    Executes the command with parameter (Execute(object?)).

    Source

    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.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.