Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (157).NET Core  (28).NET MAUI  (36)Angular  (65)ASP.NET  (48)ASP.NET Core  (74)ASP.NET MVC  (88)Azure  (31)Blazor  (134)DocIO  (22)Essential JS 2  (76)Essential Studio  (169)File Formats  (25)Flutter  (121)JavaScript  (167)Microsoft  (109)PDF  (64)React  (48)Succinctly series  (126)Syncfusion  (552)TypeScript  (30)Uno Platform  (3)UWP  (4)Vue  (34)Webinar  (30)Windows Forms  (57)WinUI  (40)WPF  (131)Xamarin  (148)XlsIO  (25)Other CategoriesBarcode  (5)BI  (29)Bold BI  (4)Build conference  (6)Business intelligence  (53)Button  (4)C#  (115)Chart  (56)Cloud  (11)Company  (445)Dashboard  (7)Data Science  (3)Data Validation  (6)DataGrid  (53)Development  (335)Doc  (7)DockingManager  (1)eBook  (95)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (22)Extensions  (17)File Manager  (4)Gantt  (11)Gauge  (9)Git  (4)Grid  (27)HTML  (9)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (277)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (28)Performance  (9)PHP  (1)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (7)Road Map  (10)Scheduler  (34)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (21)Solution Services  (2)Spreadsheet  (11)SQL  (8)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (11)Tips and Tricks  (88)UI  (190)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (1)Visual Studio  (23)Visual Studio Code  (14)Web  (304)What's new  (179)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Share on twitter
Share on facebook
Share on linkedin
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!

Related blogs

Tags:

Share this post:

Share on twitter
Share on facebook
Share on linkedin
Popular Now

Be the first to get updates

Subscribe RSS feed
Scroll To Top