News

.NET MAUI in .NET 7 Fills In Xamarin Gaps

With the new .NET MAUI in .NET 7 Release Candidate 1, the dev team has continued to polish things up ahead of a November GA debut while at the same time filling in gaps from its predecessor, Xamarin.

.NET Multi-platform App UI (MAUI) is called the "evolution of Xamarin.Forms" by Microsoft because it lets developers create desktop apps in addition to the traditional Xamarin mobile targets, iOS and Android.

In announcing .NET MAUI in .NET 7 RC1 this week, Microsoft's David Ortinau noted that even while the dev team has been busy responding to developer feedback with high-priority fixes while it polishes up the overall quality and reliability of the toolkit, it has continued to add new features to bring it up to par with Xamarin.

".NET 7 RC1 includes the highest priority quality fixes based on your GitHub feedback. Maps and DualScreen join .NET MAUI in .NET 7 to fill two gaps for mobile developers upgrading from Xamarin," said Ortinau, principal product manager. "We have also added some fundamental desktop features for tooltips, right-click, hover, window size, and context menus."

One of those gaps is filled with a new Map control. "This control is ideal for displaying and annotating maps using the native maps from each mobile platform," Ortinau said. "You can draw shapes on the map, drop pins, add custom pins, and even geocode street addresses, latitude, and longitude."

.NET MAUI Map Control
[Click on image for larger view.] .NET MAUI Map Control (source: Microsoft).

The other mentioned Xamarin gap, DualScreen, isn't addressed further in the announcement post or in the release notes, though there has been some GitHub discussion about it, and there's a Xamarin.Forms.DualScreen NuGet offering that was updated about two months ago.

Fleshing out the desktop side of things, Ortinau said, "In response to your needs and feedback, we have surfaced a few useful features targeted at creating better desktop experiences including context menus, tooltips, pointer gestures, right-click mapping on tap gestures, and more control over the window size."

Following are Ortinau's descriptions of some desktop highlights:

  • Context Menu: "You can now attach a context menu to any visual element using a MenuFlyout control. When the user right-clicks that view, the flyout will appear in that location when run on a desktop platform."
  • Tooltips: "Sometimes you want to provide details about what an element is onscreen when the user hovers the cursor over it. We have added a simple attached property for you to set that text, and the display and disappearance of the tooltip with automatically be triggered. This is the same pattern used for adding accessibility descriptions via semantic properties."
  • Gestures: "Desktop apps need a few gestures that aren't used on mobile, so in .NET 7 we are adding a pointer gesture for handling hover events and a button mask for secondary (commonly right-click) taps."
  • Window Size and Position: "We've added properties and events to the Window so you have control at the cross-platform layer rather than writing platform code. These include:"
    • X/Y position (not supported on macOS)
    • Width/Height (not supported on macOS)
    • Minimum Width/Height
    • Maximum Width/Height
    • SizeChanged

All of the above and many more fixes, tweaks and feature additions are explained in more detail in the voluminous release notes.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube