# ResourceSetterViewModel

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-diagnostics/diagnostics/view_models/struct-resourcesetterviewmodel/

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

```rust
struct ResourceSetterViewModel
```

A setter whose value is a resource: the key of the resource and the value it has for the
control, with a tint and a tooltip that tell a dynamic resource from a static one.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/resource_setter_view_model.rs#L14)

## Members

- [`new`](#function-new)
- [`key`](#function-key)
- [`tint`](#function-tint)
- [`value_type_tooltip`](#function-value_type_tooltip)
- [`copy_value`](#function-copy_value)
- [`copy_resource_key`](#function-copy_resource_key)

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

### new

```rust
fn new(property: &'static FerroProperty, resource_key: BoxedValue, resource_value: Option<BoxedValue>, is_dynamic: bool, clipboard: Option<Rc<dyn IClipboard>>) -> Rc<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/resource_setter_view_model.rs#L42)

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

### key

```rust
fn key(self: &Self) -> BoxedValue
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/resource_setter_view_model.rs#L59)

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

### tint

```rust
fn tint(self: &Self) -> Rc<dyn IBrush>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/resource_setter_view_model.rs#L63)

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

### value_type_tooltip

```rust
fn value_type_tooltip(self: &Self) -> String
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/resource_setter_view_model.rs#L67)

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

### copy_value

```rust
fn copy_value(self: &Self)
```

The `CopyValue` of the base class (this class does not override it).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/resource_setter_view_model.rs#L72)

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

### copy_resource_key

```rust
fn copy_resource_key(self: &Self)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Diagnostics/diagnostics/view_models/resource_setter_view_model.rs#L76)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `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`
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`TreeModel`](/docs/0.5.0/api/ferroui-treedatagrid-core/accessor/trait-treemodel/)
- `PartialEq`
- `Deref`
- [`INotifyPropertyChanged`](/docs/0.5.0/api/ferroui-base/data/model/use-inotifypropertychanged/)
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)

## Availability

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