# UntypedReversiblePropertyChange

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-xaml-interactivity/helpers/struct-untypedreversiblepropertychange/

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

```rust
struct UntypedReversiblePropertyChange
```

Coordinates reversible property changes of one property across action instances: the changes
of a property of a target form a stack, and reverting a change restores the value below it
(an internal class of the reference).

Deviation (DEVIATIONS.md, Behaviors): the reference names this class and the typed public
class [`ReversiblePropertyChange`](/docs/0.5.0/api/ferroui-xaml-interactivity/helpers/struct-reversiblepropertychange/) alike (`ReversiblePropertyChange` and
`ReversiblePropertyChange<TTarget, TValue>`); one Rust name cannot be both.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/helpers/reversible_property_change.rs#L131)

## Members

- [`new`](#function-new)
- [`apply`](#function-apply)
- [`revert`](#function-revert)

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

### new

```rust
fn new(property_name: &str) -> Self
```

Creates the coordinator of the property `property_name`.
## Panics
Panics if the name is empty.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/helpers/reversible_property_change.rs#L145)

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

### apply

```rust
fn apply(self: &Self, target: &BoxedValue, value: Option<&BoxedValue>, getter: TryGetValue<'_>, setter: Setter, temporary_setter: TrySetTemporaryValue, is_direct_property: bool) -> bool
```

Applies `value` to the property of `target`, keeping what `revert` needs.
Returns false when the value was not applied (a direct property, or a getter or setter
that failed).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/helpers/reversible_property_change.rs#L157)

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

### revert

```rust
fn revert(self: &Self) -> bool
```

Reverts the value this coordinator applied. Returns false when there is nothing to revert
or the value below could not be restored.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/helpers/reversible_property_change.rs#L248)

## 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`

## Availability

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