# IThemeVariantHost

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/styling/trait-ithemevarianthost/

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

```rust
trait IThemeVariantHost: IResourceHost
```

Interface for the host element with a theme variant.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styling/i_theme_variant_host.rs#L7)

## Members

- [`actual_theme_variant`](#function-actual_theme_variant)
- [`actual_theme_variant_changed`](#function-actual_theme_variant_changed)

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

### actual_theme_variant

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

The UI theme that is currently used by the element, which might be
different than the requested theme variant.

`None` until a theme variant has been established for the element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styling/i_theme_variant_host.rs#L12)

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

### actual_theme_variant_changed

```rust
fn actual_theme_variant_changed(self: &Self, handler: Rc<dyn Fn() -> ()>) -> Rc<dyn IDisposable>
```

Raised when the actual theme variant property value has changed.
Disposing the returned handle unsubscribes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/styling/i_theme_variant_host.rs#L16)

## Trait implementations

- [`IThemeVariantHost`](/docs/0.5.0/api/ferroui-base/styling/trait-ithemevarianthost/)

## Availability

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