# PropertyBindingEditor

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

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

```rust
struct PropertyBindingEditor
```

Native structured controls and an exact-expression fallback. `value()` accepts
either the fields or the expression. When both were edited, the user must reload
the fields explicitly, preventing a stale form from overwriting a newer expression.

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

## Members

- [`new`](#function-new)
- [`with_relative_source_extension`](#function-with_relative_source_extension)
- [`control`](#function-control)
- [`value`](#function-value)
- [`set_expression`](#function-set_expression)

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

### new

```rust
fn new(source: Option<&str>, binding_extension: &str, named_elements: &[String]) -> Rc<Self>
```

Create an unscoped editor. Relative-source creation requires the independently
resolved extension supplied by `with_relative_source_extension`.

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

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

### with_relative_source_extension

```rust
fn with_relative_source_extension(source: Option<&str>, binding_extension: &str, relative_source_extension: Option<&str>, named_elements: &[String]) -> Rc<Self>
```

Use independently resolved markup names when embedding in a XAML namespace scope.

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

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

### control

```rust
fn control(self: &Self) -> Ref<Control>
```



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

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

### value

```rust
fn value(self: &Self) -> Result<String, String>
```

Return the staged expression. No runtime object or source document is mutated.

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

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

### set_expression

```rust
fn set_expression(self: &Self, value: &str)
```

Replace the entire local draft and populate its structured fields.

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

## Trait implementations

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

## Availability

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