FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    bind_command_to_event

    function · ferroui-reactiveui · v0.5.0

    fn bind_command_to_event(command: std::rc::Rc<dyn ICommand>, command_parameter: &std::rc::Rc<dyn IObservable<crate::binding::interfaces::CommandParameter>>, subscribe: impl FnOnce(std::rc::Rc<dyn Fn() -> ()>) -> std::rc::Rc<dyn IDisposable>) -> std::rc::Rc<dyn IDisposable>
    

    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.

    View source

    Availability

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