FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CollectionChangedBehavior

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

    struct CollectionChangedBehavior
    

    Executes different sets of actions when the observed collection changes: the added_actions when items are added, the removed_actions when items are removed and the reset_actions when the collection is reset.

    The description of the change is the parameter of the actions.

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

    Returns a strong reference to this object.

    Source

    collection_property

    fn collection_property() -> &'static StyledProperty<Option<ItemsSource>>
    

    Identifies the Collection property.

    Deviation (DEVIATIONS.md, Behaviors): the collection (INotifyCollectionChanged of the reference) is an untyped list of the framework (ItemsSource); a list that does not notify its changes is not observed.

    Source

    added_actions_property

    fn added_actions_property() -> &'static DirectProperty<CollectionChangedBehavior, ActionCollection>
    

    Identifies the AddedActions property.

    Source

    removed_actions_property

    fn removed_actions_property() -> &'static DirectProperty<CollectionChangedBehavior, ActionCollection>
    

    Identifies the RemovedActions property.

    Source

    reset_actions_property

    fn reset_actions_property() -> &'static DirectProperty<CollectionChangedBehavior, ActionCollection>
    

    Identifies the ResetActions property.

    Source

    construct

    fn construct() -> Self
    

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

    Source

    new

    fn new() -> Ref<Self>
    

    Creates a behavior.

    Source

    collection

    fn collection(self: &Self) -> Option<ItemsSource>
    

    Gets or sets the collection to observe. Markup resolves a name given for it to the named element.

    Source

    set_collection

    fn set_collection(self: &Self, value: Option<ItemsSource>)
    

    Source

    added_actions

    fn added_actions(self: &Self) -> ActionCollection
    

    Actions invoked when items are added to the collection.

    Source

    removed_actions

    fn removed_actions(self: &Self) -> ActionCollection
    

    Actions invoked when items are removed from the collection.

    Source

    reset_actions

    fn reset_actions(self: &Self) -> ActionCollection
    

    Actions invoked when the collection is reset.

    Source

    Trait implementations

    Availability

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