4 Impressive Features of .NET MAUI in .NET 7
Tags: csharp, dotnet, maui, mobile
Published: 2022-11-15 13:33:21

---
title: 4 Impressive Features of .NET MAUI in .NET 7
published: true
date: 2022-11-15 11:00:04 UTC
tags: csharp, dotnet, maui, mobile
canonical_url: https://www.syncfusion.com/blogs/post/4-impressive-features-of-net-maui-in-net-7.aspx
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/acvk7r5jqpfywvwesisq.png
---

The [.NET Multi-platform App UI (.NET MAUI)](https://learn.microsoft.com/en-us/dotnet/maui/what-is-maui?view=net-maui-7.0 ".NET MAUI documentation") is a cross-platform framework that helps developers create native mobile and desktop apps with C# and XAML. It’s the latest evolution of Xamarin.Forms. As you (probably) know, [.NET MAUI is now available for .NET 7](https://devblogs.microsoft.com/dotnet/dotnet-maui-dotnet-7/ "Blog: Announcing .NET MAUI for .NET 7 General Availability"). I was really surprised to get this update so soon, with more features and performance improvements no less.

In this blog, I will take you through the new features of .NET MAUI for .NET 7.0 that excited me, and I recommend that you try them:

- [Context menu](#context-menu).
- [Tooltip support](#tooltip-support).
- [Pointer over visual state](#pointer-over-visual-state).
- [Right-click gestures](#right-click-gesture).

## <a name="context-menu">.NET MAUI context menu</a>

You can now enjoy context menu support in .NET MAUI as part of the .NET 7 release. This feature is mainly aimed at desktop platforms. You can easily integrate it from the **FlyoutBase** class with any **BindableObject** (e.g., a label).

```xml
<Label Text="Right-click here to show Context Menu">
 <FlyoutBase.ContextFlyout>
  <MenuFlyout>
   <MenuFlyoutItem Text="Cut" />
   <MenuFlyoutItem Text="Copy"/>
   <MenuFlyoutItem Text="Paste"/>
  </MenuFlyout>
 </FlyoutBase.ContextFlyout>
</Label>
```
<figure>

  <img src="https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Context-Menu-Support-for-.NET-MAUI-in-.NET-7.0-2.gif" alt="Context Menu Support for .NET MAUI in .NET 7.0" style="width:100%">

  <figcaption>Context Menu Support for .NET MAUI in .NET 7.0</figcaption>

</figure>

## <a name="tooltip-support">Tooltip support</a>

Tooltip support was one of the most wanted features in .NET MAUI, and that feature is now included. With it, you can add a tooltip to any visual element by using the **ToolTipProperties.Text** (attached property).

Refer to the following code example.

```xml
<Label ToolTipProperties.Text="Hello!"
       Text="Hover on me to show tooltip">
</Label>
```
<figure>

  <img src="https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Tooltip-Support-for-.NET-MAUI-in-.NET-7.0.gif" alt="Tooltip Support for .NET MAUI in .NET 7.0" style="width:100%">

  <figcaption>Tooltip Support for .NET MAUI in .NET 7.0</figcaption>

</figure>

## <a name="pointer-over-visual-state">Pointer over visual state</a>

Another essential feature added to the .NET MAUI platform for the .NET 7.0 release is the Pointer over visual state. This is one of the most required visual states in desktop platforms.

Refer to the following code example.

```xml
<Label Text="Hover on me to highlight">
 <VisualStateManager.VisualStateGroups>
  <VisualStateGroupList>
   <VisualStateGroup>
    <VisualState x:Name="PointerOver">
     <VisualState.Setters>
      <Setter Property="TextColor" Value="Red"/>
      <Setter Property="Background" Value="Yellow"/>
     </VisualState.Setters>
    </VisualState>
    <VisualState x:Name="Normal">
     <VisualState.Setters>
      <Setter Property="TextColor" Value="Black"/>
      <Setter Property="Background" Value="White"/>
     </VisualState.Setters>
    </VisualState>
   </VisualStateGroup>
  </VisualStateGroupList>
 </VisualStateManager.VisualStateGroups>
</Label>
```

<figure>

  <img src="https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Pointer-Over-Visual-State-in-.NET-MAUI-for-.NET-7.0.gif" alt="Pointer Over Visual State for .NET MAUI in .NET 7.0" style="width:100%">

  <figcaption>Pointer Over Visual State for .NET MAUI in .NET 7.0</figcaption>

</figure>

## <a name="right-click-gesture">Right-click gesture</a>

Right-click gesture support is also now available in .NET MAUI. With the **TapGestureRecognizer** class, a new API called **Buttons** is added in which the Primary value refers to the left-click, which we already have, and the Secondary value refers to the right-click.

Refer to the following code example.

```xml
<Image x:Name="mouseClickImage" Source="mouseclick.png" WidthRequest="250" HeightRequest="250">
 <Image.GestureRecognizers>
  <TapGestureRecognizer Buttons="Primary" Tapped="TapGestureRecognizer_Tapped" />
  <TapGestureRecognizer Buttons="Secondary" Tapped="TapGestureRecognizer_Tapped_1"/>
 </Image.GestureRecognizers>
</Image>
```
<figure>

  <img src="https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Right-click-gesture-support-in-.NET-MAUI-for-.NET-7.0.gif" alt="Right-Click Gesture Support for .NET MAUI in .NET 7.0" style="width:100%">

  <figcaption>Right-Click Gesture Support for .NET MAUI in .NET 7.0</figcaption>

</figure>

## Conclusion

Thanks for reading! I hope you enjoyed learning about these new features of .NET MAUI available in the .NET 7.0 release. Please give them a try. Also, we at Syncfusion have released a [service pack for our Essential Studio 2022 Volume 3 release](https://www.syncfusion.com/forums/178709/essential-studio-2022-volume-3-service-pack-release-v20-3-0-56-is-available-for-download "Essential Studio 2022 Volume 3 Service Pack"). We are excited to announce that with this service pack, our controls for [.NET MAUI](https://www.syncfusion.com/maui-controls "Syncfusion .NET MAUI controls") are [now compatible with .NET 7.0](https://dev.to/syncfusion/syncfusion-mobile-and-desktop-controls-are-now-compatible-with-net-7-2lba "Blog: Syncfusion Mobile and Desktop Controls are Now Compatible with .NET 7").

Our .NET MAUI components are compatible with the following development environments:

- Microsoft Visual Studio 2022 17.4.0 Preview 6.0 (.NET MAUI version 6.0.541) with .NET 7.0.
- Microsoft Visual Studio 2022 17.4.0 Preview 6.0 (.NET MAUI version 6.0.541) with .NET 6.0.
- Microsoft Visual Studio 2022 17.4.0 (.NET MAUI version 6.0.541) with .NET 6.0.
- Visual Studio 2022 for Mac 17.4 Preview with .NET 6.0.

So now you can create projects targeting .NET 7.0 and reference our service pack NuGet packages either from [NuGet Gallery](https://www.nuget.org/ "NuGet Gallery") or you can use the installer available from the [Syncfusion](https://www.syncfusion.com/maui-controls "Syncfusion .NET MAUI controls") website. Depending on your license, you can download the licensed installer or use our trial installer.

If you have any questions or comments, you can reach 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/ "Syncfusion Feedback Portal"). We are always happy to assist you!
ProgressBar")