Articles in this section
Category / Section

How to customize the CornerRadius in .NET MAUI EffectsView?

2 mins read

The .NET MAUI EffectsView control allows you to add touch effects to any view. Customizing the CornerRadius of the EffectsView can be achieved by embedding it within a Border control and setting the CornerRadius property of the RoundRectangle used in the Border.StrokeShape.

Steps to Customize CornerRadius

  1. Initialize the Control: Wrap the Syncfusion EffectsView control within a Border control.
  2. Set the StrokeShape: Define the StrokeShape property of the Border to a RoundRectangle.
  3. Define CornerRadius: Set the CornerRadius property of the RoundRectangle to the desired value.

XAML

Below is an example demonstrating how to customize the CornerRadius of an EffectsView:

 <Border HeightRequest="50" 
         WidthRequest="200">
     <Border.StrokeShape>
         <RoundRectangle CornerRadius="20"/>
     </Border.StrokeShape>
     <sfEffectsView:SfEffectsView TouchDownEffects="Ripple"
                                  RippleBackground="Red">
         <Label Text="Click Me" 
                VerticalTextAlignment="Center"
                HorizontalTextAlignment="Center"/>
     </sfEffectsView:SfEffectsView>
 </Border>

Output

EffectsView.gif

Download the complete sample on GitHub

Conclusion

I hope you enjoyed learning how to customize the CornerRadius in .NET MAUI EffectsView (SfEffectsView).

You can refer to our .NET MAUI EffectsView Feature tour page to learn about its other groundbreaking feature representations. Explore our .NET MAUI EffectsView documentationto understand how to present and manipulate data.

For current customers, you can check out our .NET MAUI components from the License and documents page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our .NET MAUI EffectsView and other .NET MAUI components.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Track, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied