# use_xaml

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-view/xaml/function-use_xaml/

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

```rust
fn use_xaml(text: &str) -> ferroui_base::Ref<ferroui_controls::Control>
```

The control of XAML text, loaded on the first run of the component
and kept: `Element::Existing(use_xaml(..))` keeps its control on
every run. A text that starts with `ferres://` is a URI.
## Panics
Panics with the message of the loader when the XAML does not load.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/xaml.rs#L66)

## Availability

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