# IContentPresenterHost

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

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

```rust
trait IContentPresenterHost
```

Represents a control which hosts a content presenter.

This interface is implemented by `ContentControl` and is used as follows:

- `register_content_presenter` is called by a content presenter when its
  templated parent changes; the host decides whether the presenter is
  the one that displays its content.
- The presenter of a host adds the control it creates to the logical
  children of the host rather than to its own.

A class implementing the trait is made known with
[`register_content_presenter_host`](/docs/0.5.0/api/ferroui-controls/presenters/function-register_content_presenter_host/), normally from its class
initialization.

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

## Members

- [`logical_children`](#function-logical_children)
- [`register_content_presenter`](#function-register_content_presenter)

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

### logical_children

```rust
fn logical_children(self: &Self) -> &FerroList<Ref<StyledElement>>
```

The logical children of the host control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/i_content_presenter_host.rs#L21)

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

### register_content_presenter

```rust
fn register_content_presenter(self: &Self, presenter: &ContentPresenter) -> bool
```

Registers a content presenter with the host. Returns true if the
presenter was registered as the host's presenter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/i_content_presenter_host.rs#L25)

## Trait implementations

- [`IContentPresenterHost`](/docs/0.5.0/api/ferroui-controls/presenters/trait-icontentpresenterhost/)

## Availability

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