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.
Members
TYPEto_refattached_to_visual_treeon_eventevent_name_propertysource_object_propertyconstructevent_nameset_event_namesource_objectset_source_objectresolved_source
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<EventTriggerBase>
Returns a strong reference to this object.
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).
on_event
fn on_event(self: &Self, event_args: Option<&BoxedValue>)
Executes the actions associated with this behavior.
event_name_property
fn event_name_property() -> &'static StyledProperty<Option<String>>
Identifies the EventName property.
source_object_property
fn source_object_property() -> &'static StyledProperty<Option<BoxedValue>>
Identifies the SourceObject property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
event_name
fn event_name(self: &Self) -> Option<String>
Gets or sets the name of the event to listen for.
set_event_name
fn set_event_name(self: &Self, value: Option<String>)
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.
set_source_object
fn set_source_object(self: &Self, value: Option<BoxedValue>)
resolved_source
fn resolved_source(self: &Self) -> Option<BoxedValue>
The source the trigger listens to.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeStyledElementBehaviorImplExtEventTriggerBaseImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtStyledElementImplExtClassDefaultsErasedDestructorIntoEitherDerefUpcast<T>Upcast<EventTriggerBase>StaticTypeObjectTypeSubclassable<T>StyledElementImplEventTriggerBaseImplFerroObjectImplStyledElementBehaviorImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.