# SetThemeVariantAction

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

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

```rust
struct SetThemeVariantAction
```

Sets the requested theme variant of the `target` theme variant scope (or of
the sender when it is one).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/actions/set_theme_variant_action.rs#L17)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`target_property`](#function-target_property)
- [`theme_variant_property`](#function-theme_variant_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`target`](#function-target)
- [`set_target`](#function-set_target)
- [`theme_variant`](#function-theme_variant)
- [`set_theme_variant`](#function-set_theme_variant)

<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/actions/set_theme_variant_action.rs#L21)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### target_property

```rust
fn target_property() -> &'static StyledProperty<Option<ElementRef<ThemeVariantScope>>>
```

Identifies the `Target` property.

Deviation (DEVIATIONS.md, Behaviors): the action does not own its target, so the value
is an element reference.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/actions/set_theme_variant_action.rs#L32)

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

### theme_variant_property

```rust
fn theme_variant_property() -> &'static StyledProperty<Option<ThemeVariant>>
```

Identifies the `ThemeVariant` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/actions/set_theme_variant_action.rs#L32)

<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/actions/set_theme_variant_action.rs#L70)

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

### new

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

Creates an action.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/actions/set_theme_variant_action.rs#L75)

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

### target

```rust
fn target(self: &Self) -> Option<Ref<ThemeVariantScope>>
```

Gets or sets the target theme variant scope. If not set, the sender is used when it is a
scope. Markup resolves a name given for it to the named element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/actions/set_theme_variant_action.rs#L81)

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

### set_target

```rust
fn set_target(self: &Self, value: impl Into<Nullable<ThemeVariantScope>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/actions/set_theme_variant_action.rs#L85)

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

### theme_variant

```rust
fn theme_variant(self: &Self) -> Option<ThemeVariant>
```

Gets or sets the theme variant to set. This is a property of the object model.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/actions/set_theme_variant_action.rs#L90)

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

### set_theme_variant

```rust
fn set_theme_variant(self: &Self, value: Option<ThemeVariant>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions.Custom/actions/set_theme_variant_action.rs#L94)

## 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`
- [`StyledElementActionImplExt`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementactionimplext/)
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<SetThemeVariantAction>`](/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/)
- [`StyledElementActionImpl`](/docs/0.5.0/api/ferroui-xaml-interactivity/trait-styledelementactionimpl/)

## Availability

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