Add Effects Like a Pro Using .NET MAUI Effects View | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (174).NET Core  (29).NET MAUI  (207)Angular  (109)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (41)Black Friday Deal  (1)Blazor  (215)BoldSign  (14)DocIO  (24)Essential JS 2  (107)Essential Studio  (200)File Formats  (66)Flutter  (133)JavaScript  (221)Microsoft  (119)PDF  (81)Python  (1)React  (100)Streamlit  (1)Succinctly series  (131)Syncfusion  (915)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (51)Windows Forms  (61)WinUI  (68)WPF  (159)Xamarin  (161)XlsIO  (36)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (147)Chart  (131)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (63)Development  (628)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (40)Extensions  (22)File Manager  (7)Gantt  (18)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (507)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (43)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (10)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (387)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (592)What's new  (332)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Add Effects Like a Pro Using .NET MAUI Effects View

Add Effects Like a Pro Using .NET MAUI Effects View

Adding effects to an application (particularly in a mobile app) is an important part of building your app. Adding effects not only enhances the app’s appearance but also user interaction and experience.

Especially, when you are developing a cross-platform app like in .NET MAUI, you should apply good effects to your UI design. In this blog, I’ll show you how to use our Effects View control to do this.

Basic .NET MAUI Effects

Mobile apps like .NET MAUI commonly include basic effects, like ripple, rotation, and scaling. These kinds of animations make the app highly interactive.

.NET MAUI Effects View

At Syncfusion, we understand the need for and usage of this requirement and provide you with a control named .NET MAUI Effects View. It’s a container control that provides modern effects like ripple, selection, scaling, and rotation. You can render these effects using touch interactions, such as touch down, touch up, and long press, and also by calling the API.

You can easily integrate the control into your .NET MAUI app and it will take care of the effects based on your requirement and settings.

How to integrate .NET MAUI Effects View in your app

Syncfusion .NET MAUI controls are available on Nuget.org. To add the Effects View control to your project, first, open the NuGet package manager in Visual Studio. Search for Syncfusion.Maui.Core and then install it. Then, follow these steps:

Step 1: In the MauiProgram.cs file, register the handler for Syncfusion core.

public static class MauiProgram
{
  public static MauiApp CreateMauiApp()
  {
    var builder = MauiApp.CreateBuilder();
    builder.ConfigureSyncfusionCore();
    return builder.Build();
  }
 
}

Step 2: Then, add the Syncfusion.Maui.Core namespace using the following code.

xmlns:effectsView="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"

Step 3: Finally, add the Syncfusion .NET MAUI Effects View as the parent of the element to which you need to add the effects. Here, I have added it to a card UI.

<effectsView:SfEffectsView>
 <Grid WidthRequest="200" HeightRequest="75" ColumnDefinitions="75,*">
  <Image Source="Person.png"/>
   <VerticalStackLayout Grid.Column="1">
    <Label Text="Laura Steffi" FontSize="18"/>
    <Label Text="Data Science Analyst" />
   </VerticalStackLayout>
 </Grid>
</effectsView:SfEffectsView>
Adding .NET MAUI Effects View to Card UI
Adding .NET MAUI Effects View to Card UI

Effects

Now, let’s see the various effects supported by the .NET MAUI Effects View control.

Highlight effects

SfEffects.Highlight is a smooth transition on the background color of the Effects View control.

<effectsView:SfEffectsView TouchDownEffects="Highlight"  HighlightBackground="#FF0000"/
Highlight Effects in .NET MAUI Effects View Control
Highlight Effects in .NET MAUI Effects View Control

Ripple

The SfEffects.Ripple is an expandable circle. It is initially placed on the tapped location, and it grows till the whole layout is filled. The SfEffects.Ripple is rendered based on the InitialRippleFactor.

<effectsView:SfEffectsView TouchDownEffects="Ripple"/>
Ripple Effects in .NET MAUI Effects View Control
Ripple Effects in .NET MAUI Effects View Control

Rotation

SfEffects.Rotation provides a circular movement to the Effects View control around the center based on the specified Angle.

<effectsView:SfEffectsView TouchDownEffects="Rotation"  Angle="180"/>
Rotation Effects in .NET MAUI Effects View Control
Rotation Effects in .NET MAUI Effects View Control

Scale

SfEffects.Scale is a smooth transition on the size of the SfEffectsView.Content from its actual size to the size mentioned on the ScaleFactor in pixels.

<effectsView:SfEffectsView ScaleFactor="0.85" TouchDownEffects="None" TouchUpEffects="None" LongPressEffects="Scale"/>
Scale Effects in .NET MAUI Effects View Control
Scale Effects in .NET MAUI Effects View Control

Selection

SfEffects.Selection is a smooth color transition to indicate whether the Effects View state is selected or not.

<effectsView:SfEffectsView  LongPressEffects="Selection" SelectionBackground="#FF0000"/>
Selection Effects in .NET MAUI Effects View Control
Selection Effects in .NET MAUI Effects View Control

Valid combination of effects

Following are the valid combination of effects that can be applied in the .NET MAUI Effects View control:

  • Highlight and ripple
  • Highlight and selection
  • Ripple and selection
  • Highlight, ripple, and selection
  • Scale and selection

Possible interactions to show effects

Now, let’s see the different touch interaction features available to set effects in the .NET MAUI Effects View control.

Touch down

Use the TouchDownEffects property to render the effects with touch-down interaction.

<effectsView:SfEffectsView TouchDownEffects="Ripple"/>

Long press

Use the LongPressEffects property to render the effects with long-press interaction.

<effectsView:SfEffectsView LongPressEffects="Ripple"/>

Touch up

Use the TouchUpEffects property to render the effects with touch-up interaction.

<effectsView:SfEffectsView TouchUpEffects="Ripple"/>

When and where effects are needed

Effects are needed on interactive elements like buttons, sliders, tab headers, switches, etc. These interactive elements generally show ripple effects on tapping and highlight effects on mouse hovering. Cross-platform apps like .NET MAUI will depend on mouse hover and tap interactions.

If you are creating an interactive Image control, then simply add those interactions into the .NET MAUI Effects View control. Don’t worry, the control will take care of the effects.

Note: For more details, refer to the Getting started with .NET MAUI Effects View documentation.

Conclusion

Thanks for reading! I hope you enjoyed this blog. Try out the modern effects available in our .NET MAUI Effects View control and leave your feedback in the comments section below!

For questions, you can contact us through our support forumsupport portal, or feedback portal. As always, we are happy to assist you!

Test Flight
App Center Badge
Google Play Store Badge
Microsoft Badge
Github Store Badge

Related blogs

Tags:

Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed

Be the first to get updates

Subscribe RSS feed