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

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

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events