FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    InteractionTriggerBehavior

    struct · ferroui-xaml-interactions-reactiveui · v0.5.0

    struct InteractionTriggerBehavior
    

    A behavior that registers a handler for a ReactiveUI interaction (ferroui_reactiveui::Interaction) and executes its actions when the interaction is triggered.

    The handler is registered while the associated object is in the visual tree; it executes the actions with the associated object as the sender and the input of the interaction as the parameter, and answers the interaction with the default output.

    Deviation (DEVIATIONS.md, Behaviors): the class is not generic; the type arguments of the reference travel with the interaction (AnyInteraction). The associated object is checked to be a Visual on attach, as StyledElementTrigger<Visual> does.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<InteractionTriggerBehavior>
    

    Returns a strong reference to this object.

    Source

    interaction_property

    fn interaction_property() -> &'static StyledProperty<Option<AnyInteraction>>
    

    Identifies the Interaction property.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Creates the trigger.

    Source

    interaction

    fn interaction(self: &Self) -> Option<AnyInteraction>
    

    Gets or sets the interaction to register the handler for. This is a property of the object model.

    Source

    set_interaction

    fn set_interaction(self: &Self, value: Option<AnyInteraction>)
    

    Source

    interaction_of

    fn interaction_of<I: 'static, O: 'static>(self: &Self) -> Option<ReactiveInteraction<I, O>>
    

    The interaction, if its types are I and O (the typed Interaction of the reference).

    Source

    set_interaction_of

    fn set_interaction_of<I: Clone + PartialEq + 'static, O: Clone + Default + 'static>(self: &Self, value: Option<ReactiveInteraction<I, O>>)
    

    Sets the interaction from a typed one.

    Source

    Trait implementations

    Availability

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