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 for Converge360.

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube