BindingBehavior
struct · ferroui-xaml-interactions-custom · v0.5.0
struct BindingBehavior
Applies a binding to a target property when the control is attached to the visual tree.
The binding is cleared when the control leaves the visual tree or the behavior is detached.
Members
TYPEto_reftarget_property_propertytarget_object_propertybinding_propertyconstructnewtarget_propertyset_target_propertytarget_objectset_target_objectbindingset_binding
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<BindingBehavior>
Returns a strong reference to this object.
target_property_property
fn target_property_property() -> &'static StyledProperty<Option<&'static FerroProperty>>
Gets or sets the property that will be bound.
target_object_property
fn target_object_property() -> &'static StyledProperty<Option<ElementRef<FerroObject>>>
Gets or sets the object that owns the TargetProperty.
Deviation (DEVIATIONS.md, Behaviors): the behavior does not own its target, so the value is an element reference.
binding_property
fn binding_property() -> &'static StyledProperty<Option<Rc<dyn BindingBase>>>
Gets or sets the binding to apply.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
Creates a behavior.
target_property
fn target_property(self: &Self) -> Option<&'static FerroProperty>
The property that will be bound. This is a property of the object model.
set_target_property
fn set_target_property(self: &Self, value: Option<&'static FerroProperty>)
target_object
fn target_object(self: &Self) -> Option<Ref<FerroObject>>
The object that owns the target_property. This is a property
of the object model; markup resolves a name given for it to the named element.
set_target_object
fn set_target_object(self: &Self, value: impl Into<Nullable<FerroObject>>)
binding
fn binding(self: &Self) -> Option<Rc<dyn BindingBase>>
The binding to apply. This is a property of the object model, to which markup assigns a binding as it is.
set_binding
fn set_binding(self: &Self, value: Option<Rc<dyn BindingBase>>)
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeAttachedToVisualTreeBehaviorImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtStyledElementImplExtClassDefaultsErasedDestructorIntoEitherDisposingBehaviorImplExtStyledElementBehaviorImplExtDerefUpcast<T>Upcast<BindingBehavior>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImplStyledElementImplStyledElementBehaviorImplDisposingBehaviorImplAttachedToVisualTreeBehaviorImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.