# AttachedProperty

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/struct-attachedproperty/

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

```rust
struct AttachedProperty<T: PropertyValue>
```

An attached property: a styled property that is defined by one class and
set on objects of another.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styled_property.rs#L386)

## Members

- [`add_owner`](#function-add_owner)
- [`add_owner_with`](#function-add_owner_with)

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

### add_owner

```rust
fn add_owner<TOwner: ObjectType>(self: &'static Self) -> &'static Self
```

Attaches the property as a non-attached property on class `TOwner`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styled_property.rs#L416)

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

### add_owner_with

```rust
fn add_owner_with<TOwner: ObjectType>(self: &'static Self, metadata: StyledPropertyMetadata<T>) -> &'static Self
```

Attaches the property as a non-attached property on class `TOwner`,
with metadata for that class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styled_property.rs#L423)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- `ErasedDestructor`
- `IntoEither`
- [`TypedProperty`](/docs/0.5.0/api/ferroui-base/trait-typedproperty/)
- [`Registrable`](/docs/0.5.0/api/ferroui-base/trait-registrable/)
- `Deref`

## Availability

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