# VirtualizingPanelImpl

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/trait-virtualizingpanelimpl/

**trait** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
trait VirtualizingPanelImpl: PanelImpl + $crate::Upcast<VirtualizingPanel>
```

The overridable members introduced by the class.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/virtualizing_panel.rs#L31)

## Members

- [`scroll_into_view`](#function-scroll_into_view)
- [`container_from_index`](#function-container_from_index)
- [`index_from_container`](#function-index_from_container)
- [`get_realized_containers`](#function-get_realized_containers)
- [`get_control_in_direction`](#function-get_control_in_direction)
- [`on_items_control_changed`](#function-on_items_control_changed)
- [`on_items_changed`](#function-on_items_changed)

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

### scroll_into_view

```rust
fn scroll_into_view(this: &Self, index: i32) -> Option<Ref<Control>>
```

Scrolls the specified item into view.

Returns the element with the specified index, or `None` if the
element could not be brought into view.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/virtualizing_panel.rs#L31)

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

### container_from_index

```rust
fn container_from_index(this: &Self, index: i32) -> Option<Ref<Control>>
```

Returns the container for the item at the specified index.

Returns the container for the item at the specified index within
the item collection, if the item is realized; otherwise, `None`.

Note for implementors: if the item at the specified index is an
item-is-self-container item that has previously been realized,
then the item should be returned even if it currently falls
outside the realized viewport.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/virtualizing_panel.rs#L31)

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

### index_from_container

```rust
fn index_from_container(this: &Self, container: &Ref<Control>) -> i32
```

Returns the index to the item that has the specified realized
container.

Returns the index to the item that corresponds to the specified
realized container, or -1 if `container` is not found.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/virtualizing_panel.rs#L31)

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

### get_realized_containers

```rust
fn get_realized_containers(this: &Self) -> Option<Vec<Ref<Control>>>
```

Gets the currently realized containers.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/virtualizing_panel.rs#L31)

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

### get_control_in_direction

```rust
fn get_control_in_direction(this: &Self, direction: NavigationDirection, from: Option<&Ref<InputElement>>, wrap: bool) -> Option<Ref<InputElement>>
```

Gets the next control in the specified direction.

`from` is the control from which movement begins and `wrap`
tells whether to wrap around when the first or last item is
reached.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/virtualizing_panel.rs#L31)

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

### on_items_control_changed

```rust
fn on_items_control_changed(this: &Self, old_value: Option<&Ref<ItemsControl>>)
```

Called when the `ItemsControl` that owns the panel changes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/virtualizing_panel.rs#L31)

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

### on_items_changed

```rust
fn on_items_changed(this: &Self, items: &Rc<ItemsSourceView>, e: &ItemsChangedEventArgs<'_>)
```

Called when the `items` collection of the owner `ItemsControl`
changes.

This method is called a `collection changed` event is raised by
the items, or when the items property of the items control is
set to a new collection, in which case the action will be a
reset.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/virtualizing_panel.rs#L31)

## Trait implementations

- [`VirtualizingPanelImpl`](/docs/0.5.0/api/ferroui-controls/trait-virtualizingpanelimpl/)

## Availability

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