Skip to main content

ItemsControlImpl

Trait ItemsControlImpl 

Source
pub trait ItemsControlImpl: TemplatedControlImpl + Upcast<ItemsControl> {
    // Provided methods
    fn create_container_for_item_override(
        this: &Self,
        item: &Option<BoxedValue>,
        index: i32,
        recycle_key: Option<RecycleKey>,
    ) -> Ref<Control> { ... }
    fn prepare_container_for_item_override(
        this: &Self,
        container: &Ref<Control>,
        item: &Option<BoxedValue>,
        index: i32,
    ) { ... }
    fn container_for_item_prepared_override(
        this: &Self,
        container: &Ref<Control>,
        item: &Option<BoxedValue>,
        index: i32,
    ) { ... }
    fn container_index_changed_override(
        this: &Self,
        container: &Ref<Control>,
        old_index: i32,
        new_index: i32,
    ) { ... }
    fn clear_container_for_item_override(this: &Self, container: &Ref<Control>) { ... }
    fn needs_container_override(
        this: &Self,
        item: &Option<BoxedValue>,
        index: i32,
    ) -> (bool, Option<RecycleKey>) { ... }
    fn on_items_view_collection_changed(
        this: &Self,
        e: &ItemsChangedEventArgs<'_>,
    ) { ... }
}
Expand description

The overridable members introduced by the class.

Provided Methods§

Source

fn create_container_for_item_override( this: &Self, item: &Option<BoxedValue>, index: i32, recycle_key: Option<RecycleKey>, ) -> Ref<Control>

Creates or a container that can be used to display an item.

Source

fn prepare_container_for_item_override( this: &Self, container: &Ref<Control>, item: &Option<BoxedValue>, index: i32, )

Prepares the specified element to display the specified item.

Source

fn container_for_item_prepared_override( this: &Self, container: &Ref<Control>, item: &Option<BoxedValue>, index: i32, )

Called when a container has been fully prepared to display an item.

This method will be called when a container has been fully prepared and added to the logical and visual trees, but may be called before a layout pass has completed. It is called immediately before the container_prepared event is raised.

Source

fn container_index_changed_override( this: &Self, container: &Ref<Control>, old_index: i32, new_index: i32, )

Called when the index for a container changes due to an insertion or removal in the items collection.

Source

fn clear_container_for_item_override(this: &Self, container: &Ref<Control>)

Undoes the effects of the prepare_container_for_item_override method.

Source

fn needs_container_override( this: &Self, item: &Option<BoxedValue>, index: i32, ) -> (bool, Option<RecycleKey>)

Determines whether the specified item can be its own container.

Returns true if the item needs a container; otherwise false if the item can itself be used as a container. The second value is a key that can be used to locate a previously recycled container of the correct type, or None if the item cannot be recycled. If the item is its own container then by definition it cannot be recycled, so the key should be None.

Source

fn on_items_view_collection_changed(this: &Self, e: &ItemsChangedEventArgs<'_>)

Called when the collection changed event is raised on the items view.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§