# MaterialRipple

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-themes-material/ripple/struct-materialripple/

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

```rust
struct MaterialRipple
```

A bounded Material ink ripple. Place it inside the root of a control template, above the
background/state layer and below the content. It observes the templated parent's input,
so it neither intercepts hit testing nor changes the control's click, capture or focus behavior.

Hover and focus state layers remain the template's responsibility. A separate pressed state
layer must not be painted on top of this ripple: its default peak opacity is already 0.10.

```xml
<material:MaterialRipple Fill="{TemplateBinding Foreground}"
                         CornerRadius="{TemplateBinding CornerRadius}"
                         ReducedMotion="{DynamicResource MaterialReducedMotion}" />
```

Each touch contact has an independent wave; quick taps finish expanding before fading out.
Frame callbacks and input subscriptions use weak references and are canceled on detachment.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L54)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`fill_property`](#function-fill_property)
- [`corner_radius_property`](#function-corner_radius_property)
- [`is_bounded_property`](#function-is_bounded_property)
- [`radius_property`](#function-radius_property)
- [`interaction_opacity_property`](#function-interaction_opacity_property)
- [`reduced_motion_property`](#function-reduced_motion_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`fill`](#function-fill)
- [`set_fill`](#function-set_fill)
- [`corner_radius`](#function-corner_radius)
- [`set_corner_radius`](#function-set_corner_radius)
- [`is_bounded`](#function-is_bounded)
- [`set_is_bounded`](#function-set_is_bounded)
- [`radius`](#function-radius)
- [`set_radius`](#function-set_radius)
- [`interaction_opacity`](#function-interaction_opacity)
- [`set_interaction_opacity`](#function-set_interaction_opacity)
- [`reduced_motion`](#function-reduced_motion)
- [`set_reduced_motion`](#function-set_reduced_motion)
- [`begin_press`](#function-begin_press)
- [`end_press`](#function-end_press)
- [`active_ripple_count`](#function-active_ripple_count)
- [`cancel`](#function-cancel)

<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.Themes.Material/ripple.rs#L64)

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

### to_ref

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

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L64)

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

### fill_property

```rust
fn fill_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
```

The ripple color, normally the surrounding component's content color.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L70)

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

### corner_radius_property

```rust
fn corner_radius_property() -> &'static StyledProperty<CornerRadius>
```

The clipping corners; bind to the animated surface corners for shape-changing buttons.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L70)

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

### is_bounded_property

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

Whether the ripple is clipped to the rounded layout bounds.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L70)

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

### radius_property

```rust
fn radius_property() -> &'static StyledProperty<f64>
```

An explicit final radius. NaN computes the radius from the control's bounds.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L70)

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

### interaction_opacity_property

```rust
fn interaction_opacity_property() -> &'static StyledProperty<f64>
```

The Material pressed-state opacity, multiplied by the brush's own alpha.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L70)

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

### reduced_motion_property

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

Replaces radial motion by a steady pressed indication. Also honors platform settings.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L70)

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

### construct

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L208)

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

### new

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L220)

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

### fill

```rust
fn fill(self: &Self) -> Option<Rc<dyn IBrush>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L224)

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

### set_fill

```rust
fn set_fill(self: &Self, value: Option<Rc<dyn IBrush>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L228)

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

### corner_radius

```rust
fn corner_radius(self: &Self) -> CornerRadius
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L232)

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

### set_corner_radius

```rust
fn set_corner_radius(self: &Self, value: CornerRadius)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L236)

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

### is_bounded

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L240)

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

### set_is_bounded

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L244)

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

### radius

```rust
fn radius(self: &Self) -> f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L248)

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

### set_radius

```rust
fn set_radius(self: &Self, value: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L252)

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

### interaction_opacity

```rust
fn interaction_opacity(self: &Self) -> f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L256)

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

### set_interaction_opacity

```rust
fn set_interaction_opacity(self: &Self, value: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L260)

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

### reduced_motion

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L264)

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

### set_reduced_motion

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L268)

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

### begin_press

```rust
fn begin_press(self: &Self, origin: Point)
```

Starts a programmatic indication. The location is in this control's coordinate space.
Template instances receive their input automatically and do not need this method.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L274)

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

### end_press

```rust
fn end_press(self: &Self)
```

Finishes the corresponding programmatic indication.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L279)

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

### active_ripple_count

```rust
fn active_ripple_count(self: &Self) -> usize
```

The number of held or fading press indications, useful to inspect control behavior.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L284)

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

### cancel

```rust
fn cancel(self: &Self)
```

Clears every indication, for example when a control becomes disabled.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/ripple.rs#L289)

## 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`
- [`InputElementImplExt`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimplext/)
- [`InteractiveImplExt`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimplext/)
- [`LayoutableImplExt`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimplext/)
- [`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/)
- [`VisualImplExt`](/docs/0.5.0/api/ferroui-base/trait-visualimplext/)
- `ErasedDestructor`
- `IntoEither`
- `CastableFrom<ST, Uninit, Uninit>`
- `CastableFrom<ST, Initialized, Initialized>`
- `Read<Exclusive, BecauseExclusive>`
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<MaterialRipple>`](/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/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- `Drop`

## Availability

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