# load_winui

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-markup-xaml-winui/function-load_winui/

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

```rust
fn load_winui(xaml: &str, local_assembly: Option<&'static ferroui_base::metadata::MarkupAssembly>, root_instance: Option<ferroui_base::BoxedValue>, uri: Option<url::Url>, design_mode: bool, options: &crate::WinUIXamlOptions) -> Result<ferroui_base::BoxedValue, ferroui_markup_xaml::XamlLoadError>
```

Loads an explicitly opted-in WinUI document after the shared migration pass. Unresolved
semantics fail with their original-source diagnostic codes and locations. The normal compiler
then checks real registered types and members; migration never hides a loader error.
Referenced asset documents must be migrated separately by their owning project. Use
[`migrate_winui_xaml`](/docs/0.5.0/api/ferroui-markup-xaml-winui/function-migrate_winui_xaml/) directly to inspect adaptation evidence or to feed the exact same
document into the build-time compiler.

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

## Availability

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