Welcome to the Sands of MAUI—newsletter-style issues dedicated to bringing together latest .NET MAUI content relevant to developers.
A particle of sand—tiny and innocuous. But put a lot of sand particles together and we have something big—a force to reckon with. It is the smallest grains of sand that often add up to form massive beaches, dunes and deserts.
Most .NET developers are excited with .NET Multi-platform App UI (MAUI)—the evolution of modern .NET cross-platform developer experience. Going forward, developers should have much more confidence in the technology stack and tools as .NET MAUI empowers native cross-platform solutions on both mobile and desktop.
While it may take a long flight to reach the sands of MAUI island, developer excitement around .NET MAUI is quite palpable in all the shared content. Like the grains of sand, every piece of news/article/documentation/video/tutorial/livestream contributes toward developer knowledge in .NET MAUI and we grow a community/ecosystem willing to learn and help.
Sands of MAUI is a humble attempt to collect all the .NET MAUI awesomeness in one place. Here’s what is noteworthy for the week of June 20, 2022:
Tim Heuer hosted an epic session at Microsoft Build 2022 on building native apps for any device with .NET and Visual Studio. .NET 6 adoption has been quite phenomenal compared to past .NETs—up to 5.6 million active developers using .NET 6 each month. Perhaps a few things are making .NET 6 enticing—unified runtime/SDK, long-term support, great performance, hot reload tooling, C# 10/F# 6 releases and Apple Silicon support. May be the biggest driver of .NET 6 adoption is platform reach—developers are now seeing the promise of targeting mobile/desktop from true single code base with .NET MAUI, and sharing code with web apps written in Blazor.
While .NET MAUI tooling on Visual Studio for both Windows/Mac remains in Preview for a bit longer, developers are clearly excited about .NET MAUI—building true native mobile/desktop apps with easy platform API access from one shared code base. Maddy Montaquila and Daniel Roth joined the party to show off the latest with .NET MAUI tooling and building hybrid apps with Blazor—app showcases do not get much better than the .NET podcast app. Visual Studio 2022 has also enjoyed meteoric adoption—enabling modern cross-platform app development with solid performance and productivity. Add GitHub and Azure to the developer workflow, and it is not difficult to see why .NET is one of the most productive technology stacks for modern native app development across various devices. Cheers to that.
With .NET MAUI now out as General Availability (GA), it is understandable that lot more developers are coming into the ecosystem to try out the next-generation of cross-platform promise. And .NET MAUI delivers with first class support for iOS, Android, MacOS, Windows and Tizen—all from a single code base with solid tooling, and enabling Blazor to come to native apps as well. But there is no denying—there is a lot to learn for someone new coming into .NET MAUI, and seasoned cross-platform developers could use a refresher as well. Thankfully, there are plenty of ways to learn, and Matthew Soucoup compiled a wonderful list of .NET MAUI resources.
Matt points out all the ways developers can learn .NET MAUI—the Microsoft Learn paths, official .NET MAUI documentation, .NET MAUI for beginners video series and other community resources. For folks who learn by doing and want to dive deeper, the .NET MAUI Learning Challenge and Workshops are happy to oblige. With solid Visual Studio tooling and a rich ecosystem, developers wanting to learn .NET MAUI should have plenty to get going and be destined for success.
Today’s .NET is open source and a cross-platform developer framework with solid tooling. Xamarin.Forms and .NET MAUI enable developers to build native apps for iOS/Android running on plethora of devices. How developers access native mobile APIs through .NET, however, has evolved over years. A .NET MAUI aficianado wrote an article about the evolution of mobile platform API access with .NET—through the lens of a little American history.
The early days of Xamarin/Xamarin.Forms started with the plugins ecosystem—little abstractions that wrapped platform-specific code and exposed functionality in straight C#. While there were a lot of community and Microsoft contributions to the plugins ecosystem, developers lacked confidence and there were multiple plugins/NuGet packages to do the same functionality.
Enter Xamarin.Essentials—the one library to rule them all with easy platform API access to Android, iOS and UWP functionality. Xamarin.Essentials represented a substantial effort in standardizing platform API access from .NET and provided developers a stable canvas to depend on for platform functionality—now bundled into Xamarin projects with default templates.
With the evolution to .NET MAUI and embracing desktop support in addition to the mobile-first mindset, platform API access got revamped to .NET MAUI Essentials. Under the hood, .NET MAUI Essentials provides the same platform API or functionality abstractions—all exposed neatly through C#. .NET MAUI Essentials became such a strategic part of .NET MAUI that it is not explicitly there any more—it is assimilated and simply baked in. In the past, the monolithic Microsoft.Maui.Essentials namespace brought in all of .NET MAUI Essentials—now, the objective is to keep things granular with grouped namespaces for using specific platform APIs/features. Parallels with American history keeps things interesting—the evolution of mobile platform API access has been an epic journey.
For developers tinkering with .NET MAUI on MacOS, there is good news—Visual Studio for Mac 2022 17.3 Preview 2 is now available. James Montemagno pointed out the latest VS for Mac preview release—go get the hot bits developers.
Preview 2 of Visual Studio for Mac 2022 17.3 builds on the first Preview—which introduced support for .NET MAUI tooling and .NET 7. The latest VS for Mac comes complete with updated .NET MAUI templates and better hot reload functionality. If developers open an existing .NET MAUI solution, the IDE will now offer to install any missing/updated workloads. And Apple Developer Account management is slowly coming back to VS for Mac—all great news for .NET MAUI developers targeting iOS/Android from their MacOS development machines.
App Actions allow developers to add shortcuts to an app’s launch icon to invoke custom functionality or deep link into the app—essentially, extra ways of starting your app. .NET MAUI has support for App Actions across iOS/Android/Windows—the IAppActions interface is exposed through the AppActions.Current property, and is available in the Microsoft.Maui.ApplicationModel namespace. A simple API is provided that allows developers to declare App Actions—with a spot for custom title and subtitle and to set an icon for the action from the app’s resources.
The only problem is creating/setting icons for App Actions can be quite tricky, requiring adherence to strict specifications across platforms. Aden Earnshaw has a solution—AppActions.Icons.Maui. Developers can now grab one NuGet package that provides a set of common icons for use in Android/iOS/Windows, to quickly add icons to App Actions with little ceremony.
During .NET MAUI app bootstrapping, developers can tap into the ConfigureEssentials() method and call essentials.UseAppActionIcons() extension method. Setting a specific provided icon is as easy as selecting one of the options from the AppActionIcon class as an enumeration. Most of the provided icons on Android are also VectorDrawables—this means platform native features can be used to override the foreground/background colors of the icons. More productivity and design help for .NET MAUI developers—ain’t nothing wrong with that.
That’s it for now.
We’ll see you next week with more awesome content relevant to .NET MAUI.
Sam Basu is a technologist, author, speaker, Microsoft MVP, gadget-lover and Progress Developer Advocate for Telerik products. With a long developer background, he now spends much of his time advocating modern web/mobile/cloud development platforms on Microsoft/Telerik technology stacks. His spare times call for travel, fast cars, cricket and culinary adventures with the family. You can find him on the internet.
Subscribe to be the first to get our expert-written articles and tutorials for developers!
All fields are required