# PreviewHostOptions

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-designer/struct-previewhostoptions/

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

```rust
struct PreviewHostOptions
```



[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_host.rs#L95)

## Members

- [`register_types`](#struct_field-register_types)
- [`root_factories`](#struct_field-root_factories)
- [`resource_factory`](#struct_field-resource_factory)
- [`configuration`](#struct_field-configuration)
- [`design_time_data`](#struct_field-design_time_data)
- [`register_root`](#function-register_root)

<a id="struct_field-register_types"></a>

### register_types

```rust
register_types: Vec<std::rc::Rc<dyn Fn() -> ()>>
```

Runtime metadata registration (custom controls, converters, attached properties).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_host.rs#L97)

<a id="struct_field-root_factories"></a>

### root_factories

```rust
root_factories: std::collections::BTreeMap<String, PreviewFactory>
```

Keys may be x:Class names or namespace-qualified root type names.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_host.rs#L99)

<a id="struct_field-resource_factory"></a>

### resource_factory

```rust
resource_factory: Option<ResourcePreviewFactory>
```

Resource dictionaries, application resources, styles and custom native Window roots
can use a host-chosen artboard view. The actual Window remains available in native preview.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_host.rs#L102)

<a id="struct_field-configuration"></a>

### configuration

```rust
configuration: ferroui_markup_xaml::RuntimeXamlLoaderConfiguration
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_host.rs#L103)

<a id="struct_field-design_time_data"></a>

### design_time_data

```rust
design_time_data: bool
```

Show authored d: values and sample data in this designer host. This option is
independent from the normal runtime loader and never changes saved XAML.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_host.rs#L106)

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

### register_root

```rust
fn register_root(self: &mut Self, key: impl Into<String>, factory: PreviewFactory)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/preview_host.rs#L123)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Same`
- `Clone`
- `Default`

## Availability

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