FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Interaction

    struct · ferroui-xaml-interactivity · v0.5.0

    struct Interaction
    

    Defines a BehaviorCollection attached property and provides a method for executing an ActionCollection.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this type.

    Source

    behaviors_property

    fn behaviors_property() -> &'static AttachedProperty<Option<BehaviorCollection>>
    

    Gets or sets the BehaviorCollection associated with a specified object.

    Source

    get_behaviors

    fn get_behaviors(obj: &FerroObject) -> BehaviorCollection
    

    Gets the BehaviorCollection associated with a specified object.

    A collection is created and set if the object has none: the collection of markup's property element syntax (<Interaction.Behaviors>), which adds the behaviors to the collection the getter returns.

    Source

    set_behaviors

    fn set_behaviors(obj: &FerroObject, value: Option<BehaviorCollection>)
    

    Sets the BehaviorCollection associated with a specified object.

    Source

    execute_actions

    fn execute_actions(sender: Option<&BoxedValue>, actions: Option<&ActionCollection>, parameter: Option<&BoxedValue>) -> Vec<BoxedValue>
    

    Executes all actions in the ActionCollection and returns their results.

    sender is passed on to the actions; the value of parameter is determined by the calling behavior. Returns the results of the actions that returned one, in the order of the actions.

    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
    • StaticType
    • MarkupTyped

    Availability

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