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

  • Cloud-Focused .NET Aspire 9.1 Released

    Along with .NET 10 Preview 1, Microsoft released.NET Aspire 9.1, the latest update to its opinionated, cloud-ready stack for building resilient, observable, and configurable cloud-native applications with .NET.

  • Microsoft Ships First .NET 10 Preview

    Microsoft shipped .NET 10 Preview 1, introducing a raft of improvements and fixes across performance, libraries, and the developer experience.

  • C# Dev Kit Previews .NET Aspire Orchestration

    Microsoft's dev team has been busy updating the C# Dev Kit, a Visual Studio Code extension that enhances the C# development experience by providing tools for managing, debugging, and editing C# projects.

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

Subscribe on YouTube

Upcoming Training Events