# ItemsControlContainerEventsBehavior

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-xaml-interactions-custom/struct-itemscontrolcontainereventsbehavior/

**struct** · [`ferroui-xaml-interactions-custom`](/docs/0.5.0/api/ferroui-xaml-interactions-custom/) · v0.5.0

```rust
struct ItemsControlContainerEventsBehavior
```

Base class that exposes container related events from an `ItemsControl`.

The class is abstract: a deriving class overrides the members of
[`ItemsControlContainerEventsBehaviorImpl`](/docs/0.5.0/api/ferroui-xaml-interactions-custom/trait-itemscontrolcontainereventsbehaviorimpl/) it needs.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/items_control/items_control_container_events_behavior.rs#L16)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`on_preparing_container`](#function-on_preparing_container)
- [`on_container_prepared`](#function-on_container_prepared)
- [`on_container_index_changed`](#function-on_container_index_changed)
- [`on_container_clearing`](#function-on_container_clearing)
- [`construct`](#function-construct)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/items_control/items_control_container_events_behavior.rs#L23)

<a id="function-to_ref"></a>

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<ItemsControlContainerEventsBehavior>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/items_control/items_control_container_events_behavior.rs#L23)

<a id="function-on_preparing_container"></a>

### on_preparing_container

```rust
fn on_preparing_container(self: &Self, sender: &ItemsControl, e: &ContainerPreparedEventArgs)
```

Called before the container is prepared.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/items_control/items_control_container_events_behavior.rs#L23)

<a id="function-on_container_prepared"></a>

### on_container_prepared

```rust
fn on_container_prepared(self: &Self, sender: &ItemsControl, e: &ContainerPreparedEventArgs)
```

Called after the container has been prepared.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/items_control/items_control_container_events_behavior.rs#L23)

<a id="function-on_container_index_changed"></a>

### on_container_index_changed

```rust
fn on_container_index_changed(self: &Self, sender: &ItemsControl, e: &ContainerIndexChangedEventArgs)
```

Called when the index of a container has changed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/items_control/items_control_container_events_behavior.rs#L23)

<a id="function-on_container_clearing"></a>

### on_container_clearing

```rust
fn on_container_clearing(self: &Self, sender: &ItemsControl, e: &ContainerClearingEventArgs)
```

Called when a container is being cleared.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/items_control/items_control_container_events_behavior.rs#L23)

<a id="function-construct"></a>

### construct

```rust
fn construct() -> Self
```

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

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/items_control/items_control_container_events_behavior.rs#L108)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ItemsControlContainerEventsBehaviorImplExt`](/docs/0.5.0/api/ferroui-xaml-interactions-custom/trait-itemscontrolcontainereventsbehaviorimplext/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`DisposingBehaviorImplExt`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-disposingbehaviorimplext/)
- [`StyledElementBehaviorImplExt`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementbehaviorimplext/)
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<ItemsControlContainerEventsBehavior>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`StyledElementBehaviorImpl`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementbehaviorimpl/)
- [`ItemsControlContainerEventsBehaviorImpl`](/docs/0.5.0/api/ferroui-xaml-interactions-custom/trait-itemscontrolcontainereventsbehaviorimpl/)
- [`DisposingBehaviorImpl`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-disposingbehaviorimpl/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
