FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ObservableTriggerBehavior

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

    struct ObservableTriggerBehavior
    

    A trigger that subscribes to an observable and executes its actions whenever a new value is produced. The emitted value is exposed through the value property and passed to the actions as a parameter.

    Deviation (DEVIATIONS.md, Behaviors): classes of the class model are not generic. The observable is an observable of untyped values (Rc<dyn IObservable<Option<BoxedValue>>>, Rc<dyn IObservable<BoxedValue>> or the stream value a binding reads from a property of type IObservable<T>, ObservableValue, held in an untyped value), and value is untyped, for the IObservable<T> and T of the reference; the class can therefore be created from markup without type arguments.

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

    Returns a strong reference to this object.

    Source

    observable_property

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

    Identifies the Observable property.

    Source

    value_property

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

    Identifies the Value property.

    Source

    construct

    fn construct() -> Self
    

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

    Source

    new

    fn new() -> Ref<Self>
    

    Creates a trigger.

    Source

    observable

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

    Gets or sets the observable sequence that triggers the actions. This is a property of the object model.

    Source

    set_observable

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

    Source

    value

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

    Gets the last value received from the observable. This is a property of the object model.

    Source

    Trait implementations

    Availability

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