# WinUIXBindPolicy

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

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

```rust
enum WinUIXBindPolicy
```

What the migration does with WinUI's `{x:Bind}` (docs/porting/x-bind.md, X6).

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

## Members

- [`Compile`](#variant-compile)
- [`Reject`](#variant-reject)

<a id="variant-compile"></a>

### Compile

```rust
Compile
```

Keep x:Bind as written: the XAML compiler (the run-time loader and the Rust emitter)
compiles it with its x:Bind core, `XBindExtension` of `ferroui-markup-xaml`. The paths,
functions, casts, indexers, converters, substitute values, event bindings, `x:Phase`,
`x:DefaultBindMode`, `x:Load` and `x:DeferLoadStrategy` are WinUI's and are checked with
WinUI's messages. The bindings of a document root are initialized when it is attached to
a visual tree (a `Window` when it is activated), those of a typed template instance when
its data context changes to an item; `XBindings::get_for_root` gives the per-root
`Bindings` (`initialize`, `update`, `stop_tracking`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup.Xaml.WinUI/importer/options.rs#L30)

<a id="variant-reject"></a>

### Reject

```rust
Reject
```

Report every x:Bind of the document as an error (`WXAML1007`), for a host that rewrites
x:Bind by hand, for example to `{Binding}`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup.Xaml.WinUI/importer/options.rs#L33)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Copy`
- `Debug`
- `Default`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`

## Availability

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