FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    EventTriggerBase

    struct · ferroui-xaml-interactivity · v0.5.0

    struct EventTriggerBase
    

    A behavior that listens for a specified event on its source and executes its actions when that event is fired.

    The event is found by name: first in the AddEventHandlerRegistry, then among the routed events of the source and the plain events its markup metadata declares (the reflection of the reference; see member_lookup). The default event, AttachedToVisualTree, fires when a control without a parent is attached to the visual tree.

    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<EventTriggerBase>
    

    Returns a strong reference to this object.

    Source

    attached_to_visual_tree

    fn attached_to_visual_tree(self: &Self, sender: Option<&BoxedValue>, event_args: &BoxedValue)
    

    Raised when the event fires (by its name in the reference, the handler of the default event AttachedToVisualTree).

    Source

    on_event

    fn on_event(self: &Self, event_args: Option<&BoxedValue>)
    

    Executes the actions associated with this behavior.

    Source

    event_name_property

    fn event_name_property() -> &'static StyledProperty<Option<String>>
    

    Identifies the EventName property.

    Source

    source_object_property

    fn source_object_property() -> &'static StyledProperty<Option<BoxedValue>>
    

    Identifies the SourceObject property.

    Source

    construct

    fn construct() -> Self
    

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

    Source

    event_name

    fn event_name(self: &Self) -> Option<String>
    

    Gets or sets the name of the event to listen for.

    Source

    set_event_name

    fn set_event_name(self: &Self, value: Option<String>)
    

    Source

    source_object

    fn source_object(self: &Self) -> Option<BoxedValue>
    

    Gets or sets the source object from which this behavior listens for events. If it is not set, the source defaults to the associated object. Markup resolves a name given for it to the named element.

    Source

    set_source_object

    fn set_source_object(self: &Self, value: Option<BoxedValue>)
    

    Source

    resolved_source

    fn resolved_source(self: &Self) -> Option<BoxedValue>
    

    The source the trigger listens to.

    Source

    Trait implementations

    Availability

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