# ElementBuilder

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-view/builder/trait-elementbuilder/

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

```rust
trait ElementBuilder: Sized
```

The part of a builder the generated setters use.

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

## Members

- [`element_mut`](#function-element_mut)
- [`prop`](#function-prop)
- [`routed`](#function-routed)

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

### element_mut

```rust
fn element_mut(self: &mut Self) -> &mut ControlElement
```

The element being built.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/builder.rs#L249)

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

### prop

```rust
fn prop<P: TypedProperty + ?Sized, M>(self: Self, property: &'static P, value: impl IntoProp<<P as >::Value, M>) -> Self
```

Gives a property a value (the indexer `control[Property] = value`
upstream).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/builder.rs#L253)

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

### routed

```rust
fn routed<A: IRoutedEventArgs + 'static>(self: Self, event: &'static RoutedEvent<A>, handler: impl Fn(&Interactive, &A) -> () + 'static) -> Self
```

Handles a routed event; the handler gets the control that handles it
and the arguments.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/builder.rs#L264)

## Trait implementations

- [`ElementBuilder`](/docs/0.5.0/api/ferroui-view/builder/trait-elementbuilder/)

## Availability

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