# RevealBrush

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/media/struct-revealbrush/

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

```rust
struct RevealBrush
```

The base of the Reveal brushes (WinUI `Microsoft.UI.Xaml.Media.RevealBrush`):
a brush lit by the Reveal lights near the pointer.

A [`RevealBackgroundBrush`](/docs/0.5.0/api/ferroui-controls/media/struct-revealbackgroundbrush/) is lit by the hover and press lights the
element whose `state` is set holds; a
[`RevealBorderBrush`](/docs/0.5.0/api/ferroui-controls/media/struct-revealborderbrush/) by the border lights of the window. In fallback
mode (`always_use_fallback`, or when the
`MaterialPolicy` disables materials) the brush is its
`fallback_color`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_brush.rs#L354)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`color_property`](#function-color_property)
- [`target_theme_property`](#function-target_theme_property)
- [`always_use_fallback_property`](#function-always_use_fallback_property)
- [`state_property`](#function-state_property)
- [`is_container_property`](#function-is_container_property)
- [`construct`](#function-construct)
- [`color`](#function-color)
- [`set_color`](#function-set_color)
- [`target_theme`](#function-target_theme)
- [`set_target_theme`](#function-set_target_theme)
- [`always_use_fallback`](#function-always_use_fallback)
- [`set_always_use_fallback`](#function-set_always_use_fallback)
- [`get_state`](#function-get_state)
- [`set_state`](#function-set_state)
- [`is_border`](#function-is_border)
- [`is_in_fallback_mode`](#function-is_in_fallback_mode)

<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/FerroUI.Controls/media/reveal_brush.rs#L359)

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

### to_ref

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

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_brush.rs#L359)

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

### color_property

```rust
fn color_property() -> &'static StyledProperty<Color>
```

`Color` (default transparent white): the base colour the light is
mixed with.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_brush.rs#L443)

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

### target_theme_property

```rust
fn target_theme_property() -> &'static StyledProperty<ApplicationTheme>
```

`TargetTheme` (default light): the theme the brush is drawn for;
the border light of the light theme darkens.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_brush.rs#L443)

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

### always_use_fallback_property

```rust
fn always_use_fallback_property() -> &'static StyledProperty<bool>
```

`AlwaysUseFallback` (default `false`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_brush.rs#L443)

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

### state_property

```rust
fn state_property() -> &'static AttachedProperty<RevealBrushState>
```

`State` (attached): the Reveal state of an element, which drives
its hover and press lights.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_brush.rs#L443)

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

### is_container_property

```rust
fn is_container_property() -> &'static AttachedProperty<bool>
```

`IsContainer` (attached, internal in WinUI): the element holds a
hover and a press light.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_brush.rs#L443)

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

### construct

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_brush.rs#L485)

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

### color

```rust
fn color(self: &Self) -> Color
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_brush.rs#L523)

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

### set_color

```rust
fn set_color(self: &Self, value: Color)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_brush.rs#L527)

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

### target_theme

```rust
fn target_theme(self: &Self) -> ApplicationTheme
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_brush.rs#L531)

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

### set_target_theme

```rust
fn set_target_theme(self: &Self, value: ApplicationTheme)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_brush.rs#L535)

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

### always_use_fallback

```rust
fn always_use_fallback(self: &Self) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_brush.rs#L539)

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

### set_always_use_fallback

```rust
fn set_always_use_fallback(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_brush.rs#L543)

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

### get_state

```rust
fn get_state(element: &Visual) -> RevealBrushState
```

`GetState`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_brush.rs#L548)

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

### set_state

```rust
fn set_state(element: &Visual, value: RevealBrushState)
```

`SetState`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_brush.rs#L553)

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

### is_border

```rust
fn is_border(self: &Self) -> bool
```

Whether the brush is a border brush.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_brush.rs#L558)

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

### is_in_fallback_mode

```rust
fn is_in_fallback_mode(self: &Self) -> bool
```

`IsInFallbackMode`: the policy disables materials or
`AlwaysUseFallback` is set.

Deviation (winui-materials.md): WinUI 3 always draws the fallback
colour (its policy callback passes `true`); FerroUI draws Reveal
unless the policy disables materials (energy saver, transparency
effects off) or the platform asks for high contrast.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/media/reveal_brush.rs#L569)

## 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`
- [`BrushImplExt`](/docs/0.5.0/api/ferroui-base/media/trait-brushimplext/)
- [`XamlCompositionBrushBaseImplExt`](/docs/0.5.0/api/ferroui-base/media/trait-xamlcompositionbrushbaseimplext/)
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<RevealBrush>`](/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/)
- [`BrushImpl`](/docs/0.5.0/api/ferroui-base/media/trait-brushimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`XamlCompositionBrushBaseImpl`](/docs/0.5.0/api/ferroui-base/media/trait-xamlcompositionbrushbaseimpl/)

## Availability

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