# IRuntimeXamlLoader

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-markup-xaml/trait-iruntimexamlloader/

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

```rust
trait IRuntimeXamlLoader
```

Loads documents from their text at run time. Registered as a service
(`FerroLocator`) by the runtime XAML loader crate; without it only
compiled documents can be loaded.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup.Xaml/ferro_xaml_loader.rs#L16)

## Members

- [`load`](#function-load)
- [`load_object`](#function-load_object)

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

### load

```rust
fn load(self: &Self, document: RuntimeXamlLoaderDocument, configuration: RuntimeXamlLoaderConfiguration) -> Result<BoxedValue, XamlLoadError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup.Xaml/ferro_xaml_loader.rs#L17)

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

### load_object

```rust
fn load_object(self: &Self, instance: &BoxedValue, service_provider: Option<&Rc<dyn IServiceProvider>>) -> Result<(), XamlLoadError>
```

Populates `instance` (an object whose class names a document with
`x:Class`) from the markup of its class, when no compiled markup is
registered for it. A loader that cannot find markup for a class
keeps the default: the error of the managed original for an object
without compiled markup.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup.Xaml/ferro_xaml_loader.rs#L28)

## Availability

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