# subscribe_invalidated

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/function-subscribe_invalidated/

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

```rust
fn subscribe_invalidated(value: &dyn Any, handler: std::rc::Rc<dyn Fn() -> ()>) -> Option<std::rc::Rc<dyn IDisposable>>
```

Subscribes `handler` to the invalidation of a property value, when the
value is a media object that can change
([`affects_render_source`](/docs/0.5.0/api/ferroui-base/media/function-affects_render_source/) says which values are). Returns `None` when
the value is of another type, is absent or is immutable.

It lets a visual subscribe uniformly to whatever its render-affecting
properties hold.

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

## Availability

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