FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CommandCanExecuteIsEnabledBinder

    struct · ferroui-xaml-interactivity · v0.5.0

    struct CommandCanExecuteIsEnabledBinder
    

    Makes the IsEnabled property of an input element follow whether a command can execute: while it cannot, an IsEnabled = false value of the animation priority overlays the value of the element (one overlay per element, counted across the binders that block it).

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this type.

    Source

    new

    fn new() -> Self
    

    Creates a binder that blocks nothing.

    Source

    update

    fn update(self: &Self, target: Option<Ref<InputElement>>, enabled: bool, can_execute: Rc<dyn IObservable<bool>>)
    

    Makes the IsEnabled property of target follow can_execute when enabled; stops otherwise.

    Source

    stop

    fn stop(self: &Self)
    

    Stops following the command and removes the overlay this binder added.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Default
    • StaticType
    • IDisposable

    Availability

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