Add Effects Like a Pro Using .NET MAUI Effects View
Tags: csharp, dotnet, maui, mobile
Published: 2022-06-23 11:43:52

---
title: Add Effects Like a Pro Using .NET MAUI Effects View
published: true
date: 2022-06-23 10:00:56 UTC
tags: csharp, dotnet, maui, mobile
canonical_url: https://www.syncfusion.com/blogs/post/add-effects-like-a-pro-using-net-maui-effects-view.aspx
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u7u2lt8f8wp8e3gk2u3o.png
---

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](https://dotnet.microsoft.com/en-us/apps/maui ".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](https://www.syncfusion.com/ "Syncfusion UI Components"), we understand the need for and usage of this requirement and provide you with a control named [.NET MAUI Effects View](https://www.syncfusion.com/maui-controls/maui-effects-view ".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](https://www.nuget.org/ "Nuget Gallery"). To add the [Effects View](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Core.SfEffectsView.html?tabs=tabid-1 "Class SfEffectsView") control to your project, first, open the NuGet package manager in [Visual Studio](https://visualstudio.microsoft.com/ "Visual Studio"). Search for [Syncfusion.Maui.Core](https://www.nuget.org/packages/Syncfusion.Maui.Core/ "Syncfusion.Maui.Core NuGet package") and then install it. Then, follow these steps:

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

```csharp
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.

```html
<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](https://www.syncfusion.com/blogs/wp-content/uploads/2022/06/Adding-.NET-MAUI-Effects-View-to-Card-UI.gif)
<figcaption>Adding .NET MAUI Effects View to Card UI</figcaption>

## Effects

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

### Highlight effects

[SfEffects.Highlight](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Core.SfEffects.html#Syncfusion_Maui_Core_SfEffects_Highlight "Highlight effects in .NET MAUI Effects View") is a smooth transition on the background color of the Effects View control.

```html
<effectsView:SfEffectsView TouchDownEffects="Highlight" HighlightBackground="#FF0000"/>
```

![Highlight Effects in .NET MAUI Effects View Control](https://www.syncfusion.com/blogs/wp-content/uploads/2022/06/Highlight-Effects-in-.NET-MAUI-Effects-View-Control.gif)
<figcaption>Highlight Effects in .NET MAUI Effects View Control</figcaption>

### Ripple

The [SfEffects.Ripple](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Core.SfEffects.html#Syncfusion_Maui_Core_SfEffects_Ripple "Ripple effects in .NET MAUI Effects View") is an expandable circle. It is initially placed on the tapped location, and it grows till the whole layout is filled. The [SfEffects.Ripple](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Core.SfEffects.html#Syncfusion_Maui_Core_SfEffects_Ripple "Ripple effects in .NET MAUI Effects View") is rendered based on the [InitialRippleFactor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Core.SfEffectsView.html#Syncfusion_Maui_Core_SfEffectsView_InitialRippleFactor "InitialRippleFactor property of .NET MAUI Effects View").

```html
<effectsView:SfEffectsView TouchDownEffects="Ripple"/>
```

![Ripple Effects in .NET MAUI Effects View Control](https://www.syncfusion.com/blogs/wp-content/uploads/2022/06/Ripple-Effects-in-.NET-MAUI-Effects-View-Control.gif)
<figcaption>Ripple Effects in .NET MAUI Effects View Control</figcaption>

### Rotation

[SfEffects.Rotation](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Core.SfEffects.html#Syncfusion_Maui_Core_SfEffects_Rotation "Rotation effects in .NET MAUI Effects View") provides a circular movement to the <u>Effects View</u> control around the center based on the specified [Angle](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Core.SfEffectsView.html#Syncfusion_Maui_Core_SfEffectsView_Angle "Angle property of .NET MAUI Effects View").

```html
<effectsView:SfEffectsView TouchDownEffects="Rotation" Angle="180"/>
```

![Rotation Effects in .NET MAUI Effects View Control](https://www.syncfusion.com/blogs/wp-content/uploads/2022/06/Rotation-Effects-in-.NET-MAUI-Effects-View-Control.gif)
<figcaption>Rotation Effects in .NET MAUI Effects View Control</figcaption>

### Scale

[SfEffects.Scale](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Core.SfEffects.html#Syncfusion_Maui_Core_SfEffects_Scale "Scale effects in .NET MAUI Effects View") is a smooth transition on the size of the [SfEffectsView.Content](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Core.SfEffectsView.html#Syncfusion_Maui_Core_SfEffectsView_Content "Content property of .NET MAUI Effects View") from its actual size to the size mentioned on the [ScaleFactor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Core.SfEffectsView.html#Syncfusion_Maui_Core_SfEffectsView_ScaleFactor "ScaleFactor property of .NET MAUI Effects View") in pixels.

```html
<effectsView:SfEffectsView ScaleFactor="0.85" TouchDownEffects="None" TouchUpEffects="None" LongPressEffects="Scale"/>
```

![Scale Effects in .NET MAUI Effects View Control](https://www.syncfusion.com/blogs/wp-content/uploads/2022/06/Scale-Effects-in-.NET-MAUI-Effects-View-Control.gif)
<figcaption>Scale Effects in .NET MAUI Effects View Control</figcaption>

### Selection

[SfEffects.Selection](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Core.SfEffects.html#Syncfusion_Maui_Core_SfEffects_Selection "Selection effects in .NET MAUI Effects View") is a smooth color transition to indicate whether the Effects View state is selected or not.

```html
<effectsView:SfEffectsView LongPressEffects="Selection" SelectionBackground="#FF0000"/>
```

![Selection Effects in .NET MAUI Effects View Control](https://www.syncfusion.com/blogs/wp-content/uploads/2022/06/Selection-Effects-in-.NET-MAUI-Effects-View-Control.gif)
<figcaption>Selection Effects in .NET MAUI Effects View Control</figcaption>

## 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.

```html
<effectsView:SfEffectsView TouchDownEffects="Ripple"/>
```

### Long press

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

```html
<effectsView:SfEffectsView LongPressEffects="Ripple"/>
```

### Touch up

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

```html
<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](https://help.syncfusion.com/maui/effects-view/getting-started "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](https://www.syncfusion.com/maui-controls/maui-effects-view ".NET MAUI Effects View") control and leave your feedback in the comments section below!

For questions, you can contact us through our [support forum](https://www.syncfusion.com/forums "Syncfusion support forum"), [support portal](https://support.syncfusion.com/ "Syncfusion support portal"), or [feedback portal](https://www.syncfusion.com/feedback/xamarin-forms "Syncfusion Feedback Portal"). As always, we are happy to assist you!