# IThemeVariantProvider

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/controls/trait-ithemevariantprovider/

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

```rust
trait IThemeVariantProvider: IResourceProvider
```

Resource provider with theme variant awareness.

Can be used with `ResourceDictionary::theme_dictionaries`. This is useful
for specifying multiple resource sets for different themes.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/controls/i_theme_variant_provider.rs#L8)

## Members

- [`key`](#function-key)
- [`set_key`](#function-set_key)

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

### key

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

The key that will be used in the theme dictionaries of the containing
resource dictionary.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/controls/i_theme_variant_provider.rs#L11)

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

### set_key

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/controls/i_theme_variant_provider.rs#L13)

## Availability

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