# LayoutContextHost

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls-repeater/layouts/trait-layoutcontexthost/

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

```rust
trait LayoutContextHost
```

The Rust host bridge for the overridable WinUI layout-context contract.

Implementations must release their interior borrows before creating,
measuring, recycling or invoking other application callbacks.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout_context.rs#L26)

## Members

- [`item_count`](#function-item_count)
- [`get_item_at`](#function-get_item_at)
- [`get_or_create_element_at`](#function-get_or_create_element_at)
- [`recycle_element`](#function-recycle_element)
- [`layout_state`](#function-layout_state)
- [`set_layout_state`](#function-set_layout_state)
- [`realization_rect`](#function-realization_rect)
- [`visible_rect`](#function-visible_rect)
- [`recommended_anchor_index`](#function-recommended_anchor_index)
- [`layout_origin`](#function-layout_origin)
- [`set_layout_origin`](#function-set_layout_origin)
- [`children`](#function-children)
- [`is_virtualizing`](#function-is_virtualizing)

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

### item_count

```rust
fn item_count(self: &Self) -> i32
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout_context.rs#L27)

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

### get_item_at

```rust
fn get_item_at(self: &Self, index: i32) -> Option<BoxedValue>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout_context.rs#L28)

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

### get_or_create_element_at

```rust
fn get_or_create_element_at(self: &Self, index: i32, options: ElementRealizationOptions) -> Ref<Control>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout_context.rs#L29)

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

### recycle_element

```rust
fn recycle_element(self: &Self, element: &Ref<Control>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout_context.rs#L34)

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

### layout_state

```rust
fn layout_state(self: &Self) -> Option<BoxedValue>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout_context.rs#L35)

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

### set_layout_state

```rust
fn set_layout_state(self: &Self, value: Option<BoxedValue>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout_context.rs#L36)

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

### realization_rect

```rust
fn realization_rect(self: &Self) -> Rect
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout_context.rs#L37)

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

### visible_rect

```rust
fn visible_rect(self: &Self) -> Rect
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout_context.rs#L38)

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

### recommended_anchor_index

```rust
fn recommended_anchor_index(self: &Self) -> i32
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout_context.rs#L41)

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

### layout_origin

```rust
fn layout_origin(self: &Self) -> Point
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout_context.rs#L44)

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

### set_layout_origin

```rust
fn set_layout_origin(self: &Self, value: Point)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout_context.rs#L45)

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

### children

```rust
fn children(self: &Self) -> Vec<Ref<Control>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout_context.rs#L46)

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

### is_virtualizing

```rust
fn is_virtualizing(self: &Self) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout_context.rs#L51)

## Availability

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