# AutoDataTemplateBindingHook

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui-controls/struct-autodatatemplatebindinghook/

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

```rust
struct AutoDataTemplateBindingHook
```

A binding hook that gives an `ItemsControl` a default data template when it has no item
template and no data templates (`AutoDataTemplateBindingHook`).

It serves view models bound to item controls: without a template the items would not be
rendered as their views, so the default template shows each item with a
[`ViewModelViewHost`](/docs/0.5.0/api/ferroui-reactiveui-controls/struct-viewmodelviewhost/).

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

## Members

- [`new`](#function-new)
- [`default_item_template`](#function-default_item_template)

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

### new

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

The hook.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/auto_data_template_binding_hook.rs#L43)

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

### default_item_template

```rust
fn default_item_template() -> Rc<dyn IDataTemplate>
```

The default data template (`DefaultItemTemplate`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/auto_data_template_binding_hook.rs#L48)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Debug`
- `Default`
- [`IPropertyBindingHook`](/docs/0.5.0/api/ferroui-reactiveui/binding/interfaces/trait-ipropertybindinghook/)

## Availability

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