FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

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

    Returns a strong reference to this object.

    Source

    target_property_property

    fn target_property_property() -> &'static StyledProperty<Option<&'static FerroProperty>>
    

    Gets or sets the property that will be bound.

    Source

    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.

    Source

    binding_property

    fn binding_property() -> &'static StyledProperty<Option<Rc<dyn BindingBase>>>
    

    Gets or sets the binding to apply.

    Source

    construct

    fn construct() -> Self
    

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

    Source

    new

    fn new() -> Ref<Self>
    

    Creates a behavior.

    Source

    target_property

    fn target_property(self: &Self) -> Option<&'static FerroProperty>
    

    The property that will be bound. This is a property of the object model.

    Source

    set_target_property

    fn set_target_property(self: &Self, value: Option<&'static FerroProperty>)
    

    Source

    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.

    Source

    set_target_object

    fn set_target_object(self: &Self, value: impl Into<Nullable<FerroObject>>)
    

    Source

    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.

    Source

    set_binding

    fn set_binding(self: &Self, value: Option<Rc<dyn BindingBase>>)
    

    Source

    Trait implementations

    Availability

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