# AppBuilderExtensions

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

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

```rust
trait AppBuilderExtensions
```

Extends the application builder of `ferroui-controls` with ReactiveUI (`AppBuilderExtensions`,
`extension(AppBuilder builder)`).

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

## Members

- [`use_reactive_ui`](#function-use_reactive_ui)
- [`register_reactive_ui_views`](#function-register_reactive_ui_views)
- [`register_reactive_ui_views_from_entry_assembly`](#function-register_reactive_ui_views_from_entry_assembly)
- [`use_reactive_ui_with_di_container`](#function-use_reactive_ui_with_di_container)

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

### use_reactive_ui

```rust
fn use_reactive_ui(self: &Self, with_reactive_ui_builder: impl Fn(&ReactiveUIBuilder) -> () + 'static) -> AppBuilder
```

Configures the application to use ReactiveUI with FerroUI (`UseReactiveUI`): after the
platform services are set up, ReactiveUI is built with the services of FerroUI (activation,
property observation, command binding, the scheduler of the user interface thread), and
`with_reactive_ui_builder` can register more services or change the configuration before
the application is built.

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

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

### register_reactive_ui_views

```rust
fn register_reactive_ui_views(self: &Self, assemblies: Vec<Rc<ViewAssembly>>) -> AppBuilder
```

Registers the views of `assemblies` with the service locator after the platform services
are set up (`RegisterReactiveUIViews`).

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

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

### register_reactive_ui_views_from_entry_assembly

```rust
fn register_reactive_ui_views_from_entry_assembly(self: &Self, entry_assembly: Option<Rc<ViewAssembly>>) -> AppBuilder
```

Registers the views of the entry assembly when there is one (the internal
`RegisterReactiveUIViewsFromEntryAssembly(Assembly?)`); the builder unchanged otherwise.

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

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

### use_reactive_ui_with_di_container

```rust
fn use_reactive_ui_with_di_container<C: 'static>(self: &Self, container_factory: impl Fn() -> Rc<C> + 'static, container_config: impl Fn(&Rc<C>) -> () + 'static, dependency_resolver_factory: impl Fn(&Rc<C>) -> Rc<dyn IDependencyResolver> + 'static, configure_reactive_ui: impl Fn(&ReactiveUIBuilder) -> () + 'static) -> AppBuilder
```

Configures ReactiveUI with a dependency injection container and its resolver
(`UseReactiveUIWithDIContainer<TContainer>`): ReactiveUI is configured as by
`use_reactive_ui`; then the container is created by
`container_factory`, registered with the service locator, its resolver (from
`dependency_resolver_factory`) becomes the one of the locator, and `container_config`
configures it.

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

## Trait implementations

- [`AppBuilderExtensions`](/docs/0.5.0/api/ferroui-reactiveui-controls/trait-appbuilderextensions/)

## Availability

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