# register_view_model

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui-controls/function-register_view_model/

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

```rust
fn register_view_model<VM: PartialEq + 'static>()
```

Registers the view model type `VM` on this thread: a view model of the type is then the value
of a `DataContext` itself (`Rc<VM>` as the box), and a reference type of the untyped value
conversions (`ValueTypes::register_reference`). Idempotent.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/view_model_value.rs#L38)

## Availability

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