# SetViewModelPropertyOnLoadBehavior

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-xaml-interactions-custom/struct-setviewmodelpropertyonloadbehavior/

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

```rust
struct SetViewModelPropertyOnLoadBehavior
```

Sets a view model property when the associated control is loaded.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/view_model/set_view_model_property_on_load_behavior.rs#L13)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`property_name_property`](#function-property_name_property)
- [`value_property`](#function-value_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`property_name`](#function-property_name)
- [`set_property_name`](#function-set_property_name)
- [`value`](#function-value)
- [`set_behavior_value`](#function-set_behavior_value)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/view_model/set_view_model_property_on_load_behavior.rs#L17)

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

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<SetViewModelPropertyOnLoadBehavior>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/view_model/set_view_model_property_on_load_behavior.rs#L17)

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

### property_name_property

```rust
fn property_name_property() -> &'static StyledProperty<Option<String>>
```

Identifies the `PropertyName` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/view_model/set_view_model_property_on_load_behavior.rs#L21)

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

### value_property

```rust
fn value_property() -> &'static StyledProperty<Option<BoxedValue>>
```

Identifies the `Value` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/view_model/set_view_model_property_on_load_behavior.rs#L21)

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

### construct

```rust
fn construct() -> Self
```

Creates the class data; see `ferroui_base::FerroObject::construct`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/view_model/set_view_model_property_on_load_behavior.rs#L58)

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

### new

```rust
fn new() -> Ref<Self>
```

Creates a behavior.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/view_model/set_view_model_property_on_load_behavior.rs#L63)

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

### property_name

```rust
fn property_name(self: &Self) -> Option<String>
```

Gets or sets the property name to change. This is a property of the object model.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/view_model/set_view_model_property_on_load_behavior.rs#L68)

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

### set_property_name

```rust
fn set_property_name(self: &Self, value: Option<String>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/view_model/set_view_model_property_on_load_behavior.rs#L72)

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

### value

```rust
fn value(self: &Self) -> Option<BoxedValue>
```

Gets or sets the value to assign. This is a property of the object model.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/view_model/set_view_model_property_on_load_behavior.rs#L77)

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

### set_behavior_value

```rust
fn set_behavior_value(self: &Self, value: Option<BoxedValue>)
```

Sets the value to assign (named apart from the setter of every property of the object).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/view_model/set_view_model_property_on_load_behavior.rs#L84)

## 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`
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`StyledElementBehaviorImplExt`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementbehaviorimplext/)
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<SetViewModelPropertyOnLoadBehavior>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`StyledElementBehaviorImpl`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementbehaviorimpl/)

## Availability

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