FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    FerroCreatesCommandBinding

    struct · ferroui-reactiveui-controls · v0.5.0

    struct FerroCreatesCommandBinding
    

    Binds commands to the input elements of FerroUI, through a command source's Command property or through a routed event (FerroCreatesCommandBinding).

    A control that is a command source, such as a button or a menu item, is bound through its Command and CommandParameter properties (the ones Button registers and every button-like control and menu item shares). Any other input element is bound through a routed event that executes the command and keeps IsEnabled in step with can_execute.

    The control is given as an Rc<dyn Any> holding its handle (Ref<T>), and its type as the TypeId of that handle; FerroObjectHandles::object_of lists the other forms.

    Deviation (DEVIATIONS.md, ReactiveUI controls): the command of ReactiveUI is set on the control through a ReactiveCommandAdapter, and the parameters through boxed_parameter. A type is a command source when its class registers the Command property of buttons (an instance: when it is an ICommandSource with that property), as is ICommandSource cannot be asked of a type. The event binding has no type of event arguments to match (the trait of the port has no TEventArgs), so the event is found by its name alone.

    View source

    Members

    EVENT_TARGET_AFFINITY

    const EVENT_TARGET_AFFINITY: i32
    

    The affinity of a binding through a named routed event (EventTargetAffinity).

    Source

    COMMAND_SOURCE_AFFINITY

    const COMMAND_SOURCE_AFFINITY: i32
    

    The affinity of a binding through a command source's Command property (CommandSourceAffinity).

    Source

    new

    fn new() -> Self
    

    The binder (new FerroCreatesCommandBinding()).

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Debug
    • Default
    • Clone
    • Copy
    • ICreatesCommandBinding

    Availability

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