# ControlViewFor

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui-controls/struct-controlviewfor/

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

```rust
struct ControlViewFor<V: IControlViewFor>
```

A control of a class that implements [`IControlViewFor`](/docs/0.5.0/api/ferroui-reactiveui-controls/trait-icontrolviewfor/), as a view of ReactiveUI
(`IViewFor<TViewModel>` on the control).

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

## Members

- [`new`](#function-new)
- [`weak`](#function-weak)
- [`control`](#function-control)
- [`into_view_for_of`](#function-into_view_for_of)

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

### new

```rust
fn new(control: Ref<V>) -> Rc<Self>
```

The view of `control`, which it keeps alive.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/view_control.rs#L106)

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

### weak

```rust
fn weak(control: &Ref<V>) -> Rc<Self>
```

The view of `control`, which it does not keep alive.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/view_control.rs#L111)

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

### control

```rust
fn control(self: &Self) -> Option<Ref<V>>
```

The control, while it is alive.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/view_control.rs#L122)

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

### into_view_for_of

```rust
fn into_view_for_of(self: Rc<Self>) -> Rc<dyn IViewForOf<<V as >::ViewModel>>
```

The view as `IViewFor<TViewModel>`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/view_control.rs#L127)

## 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`
- [`IntoViewFor`](/docs/0.5.0/api/ferroui-reactiveui/binding/interfaces/trait-intoviewfor/)
- [`IViewControl`](/docs/0.5.0/api/ferroui-reactiveui-controls/trait-iviewcontrol/)
- [`IActivatableView`](/docs/0.5.0/api/ferroui-reactiveui/binding/interfaces/trait-iactivatableview/)
- [`IViewFor`](/docs/0.5.0/api/ferroui-reactiveui/binding/interfaces/trait-iviewfor/)
- [`IViewForOf<<V as IControlViewFor>::ViewModel>`](/docs/0.5.0/api/ferroui-reactiveui/binding/interfaces/trait-iviewforof/)

## Availability

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