Skip to content

Commit

Permalink
Merge pull request #870 from telerik/didi/add-ripple-gifs
Browse files Browse the repository at this point in the history
Address comments.
  • Loading branch information
didiyordanova authored Jul 3, 2024
2 parents 17e9924 + 3de8d0f commit bf44e6f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions controls/templatedbutton/ripple.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ Apply a ripple effect to the TemplatedButton, by using the following attached pr

* `RippleColor` (`Color`)—Specifies the color of the ripple effect.
* `RippleMode` (enum of type `Telerik.Maui.Theming.RippleMode`)—Specifies the mode in which the ripple effect can be visualized. The options are:
* `None`—The element will not render ripple effects.
* `Pulse`—The element will play a ripple effect on pressed and the ripple will fade away even on hold.
* `Hold`—The element will play a ripple effect on pressed and flood the element while held.
* (Default)`Pulse`—The element produces a ripple effect when pressed. The ripple fades away even when held.
* `Hold`—The element produces a ripple effect when pressed and floods the element while held.
* `None`—The element does not render ripple effects.

> The ripple effect is available on Android.
![.NET MAUI TemplatedButton ripple effect](images/templatedbutton-default-ripple-effect.gif)

### Using the Ripple Effect
### Customizing the Ripple Effect

The following example demonstrates how to apply ripple effect to the TemplatedButton.
The following example demonstrates how to customize the ripple effect of the TemplatedButton by changing the `RippleMode` and `RippleColor`.

**1.** Define the buttons in XAML:

Expand All @@ -48,4 +48,4 @@ This is the result on Android:
- [Set Visual States]({%slug templatedbutton-visual-states%})
- [Events]({%slug templatedbutton-events%})
- [Execute Command]({%slug templatedbutton-command%})
- [Style the ToggleButon]({%slug templatedbutton-styling%})
- [Style the TemplatedButton]({%slug templatedbutton-styling%})
14 changes: 7 additions & 7 deletions controls/togglebutton/ripple.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ Apply a ripple effect to the ToggleButton, by using the following attached prope

* `RippleColor` (`Color`)—Specifies the color of the ripple effect.
* `RippleMode` (enum of type `Telerik.Maui.Theming.RippleMode`)—Specifies the mode in which the ripple effect can be visualized. The options are:
* `None`—The element will not render ripple effects.
* `Pulse`—The element will play a ripple effect on pressed and the ripple will fade away even on hold.
* `Hold`—The element will play a ripple effect on pressed and flood the element while held.
* (Default)`Pulse`—The element produces a ripple effect when pressed. The ripple fades away even when held.
* `Hold`—The element produces a ripple effect when pressed and floods the element while held.
* `None`—The element does not render ripple effects.

> The ripple effect is available on Android.
![.NET MAUI ToggleButton Ripple effect](images/togglebutton-ripple-effect-default.gif)

### Using the Ripple Effect
### Customizing the Ripple Effect

The following example demonstrates how to apply ripple effect to the ToggleButton.
The following example demonstrates how to customize the ripple effect of the ToggleButton by changing the `RippleMode` and `RippleColor`.

**1.** Define the buttons in XAML:

<snippet id='togglebutton-ripple-effect' />

**2.** Define the resources in the page's resources:
**2.** Тo customize the `RippleColor` when the ToggleButton is pressed, add the following code to the page's resources.

<snippet id='togglebutton-ripple-visual-states-resources' />

Expand All @@ -43,7 +43,7 @@ This is the result on Android:

![.NET MAUI ToggleButton ripple effect customization](images/togglebutton-ripple-effect.gif)

> For a runnable example demonstrating the ToggleButton ripple effect, see the [SDKBrowser Demo Application]({%slug sdkbrowser-app%}) and go to **ToggleButton > Features** category.
> For a runnable example demonstrating the customization of the ToggleButton ripple effect, see the [SDKBrowser Demo Application]({%slug sdkbrowser-app%}) and go to **ToggleButton > Features** category.
## See Also

Expand Down

0 comments on commit bf44e6f

Please sign in to comment.