Telerik blogs

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.

.NET developers are excited with the reality of .NET Multi-platform App UI (.NET MAUI)—the evolution of modern .NET cross-platform developer technology stack. With stable tooling and a rich ecosystem, .NET MAUI empowers developers to build native cross-platform apps for mobile/desktop from single shared codebase, while inviting web technologies in the mix.

While it may take a long flight to reach the sands of MAUI island, developer excitement around .NET MAUI is quite palpable with all the created content. Like the grains of sand, every piece of news/article/documentation/video/tutorial/livestream contributes towards developer experiences 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 November 27, 2023:

Packing Light with VS Code

The next big milestone for .NET is here with .NET 8 carrying the LTS badge—the latest .NET 8 release empowers millions of apps across the web, mobile, desktop, gaming, IoT and more. Developers can take advantage of latest framework updates, performance tuning, expressive programming languages, mature tooling and rich ecosystems—it's a good time to be a .NET developer.

The annual .NET release also coincided with the biggest .NET developer virtual event of the year—.NET Conf was scheduled for November 14-16. Burke Holland and Leslie Richardson got together to host a wonderful session at .NET Conf—packing light with VS Code and the C# Dev Kit.

The duo started out with a gentle introduction to Visual Studio Code and the differences with Visual Studio IDE. VS Code is the uber-popular lightweight code editor that works seamlessly across Windows/macOS/Linux and enjoys a rich open-source Extensions ecosystem. With the new C# Dev Kit Extension, .NET developers can feel right at home inside VS Code—there is support for consistent intellisense, visualizing solution files and rich debugging experiences.

Cross-platform developers can be empowered with the new .NET MAUI VS Code Extension—there is lot of help from AI-driven CoPilot as well. The session provided valuable tips and tricks for getting the most out of VS Code—.NET developers can see practical insights towards making modern C# development lightweight and efficient.

Telerik VS Code Extension

For many modern .NET developers, particularly those targeting iOS as a platform, Macs running macOS are common development machines. With Visual Studio for Mac retiring next year, .NET MAUI tooling efforts on macOS are being consolidated to Visual Studio Code—the popular lightweight code editor that simply works consistently across Windows/macOS/Linux.

Telerik UI for .NET MAUI continues to be the most comprehensive UI component suite for .NET MAUI developer productivity and there is good news hot off the press. Say hello to Telerik UI for .NET MAUI Productivity Tool for VS Code.

The Telerik UI for .NET MAUI Productivity Tools is a VS Code Extension which includes multiple developer productivity features for code generation, configuration and usage help. The Extension includes a new .NET MAUI project template—this provides prebuilt layout with Telerik UI included and multiple configuration options for project type and target framework.

Also included in the Extension is a pack of Telerik UI for .NET MAUI Code Snippets—a handy feature for increased developer productivity. The code snippets can be easily invoked by directly typing the component name—the snippets provide fast UI component reference and configuration, thus taking out any guesswork from generated UI code. VS Code is now the preferred cross-platform editor for .NET MAUI developers, and the new Telerik VS Code Extension will make it super easy for developers lighting up .NET MAUI apps with polished Telerik UI—productivity for the win.

Desktop Menus with .NET MAUI

.NET MAUI is the evolution of modern .NET cross-platform development stack, allowing developers to reach mobile and desktop form factors from a single shared codebase. While targeting mobile platforms of iOS/Android is obvious given the evolution from Xamarin, .NET MAUI takes a bold step in adding desktop support - developers can build native apps for Windows and macOS. Building rich desktop user experiences can be challenging for developers, but Daniel Hindrikes produced a video that can help—how to create menus for desktop apps with .NET MAUI.

.NET MAUI leverages WinUI to reach Windows and MacCatalyst to reach macOS—well-established UI technology stacks should inspire confidence in building the next generation of desktop apps. However, keyboard-mouse yielding desktop users often have high expectations and desktop apps generally tend to be complex with busy UI.

One common UX paradigm for content organization and navigation in desktop apps is the menu—intuitive and popular are ways to describe desktop menus. Thankfully, .NET MAUI makes it easy for developers to create menus and Daniel walks through the paces in how to use them—layout, structure and data binding are features aimed at developer productivity.

Daniel shows off code to easily add desktop menus in .NET MAUI apps—menu bar items can have hierarchy and flyout mechanisms can be customized. Modern .NET developers and enterprises are now empowered to create greenfield desktop apps with .NET MAUI or modernize existing apps to .NET MAUI—desktop menus are here to help.

Keyboard Accelerators in .NET MAUI

.NET 8 LTS is a big milestone for .NET and with it, .NET MAUI seems all grown up as well. There is a plethora of new features, platform enhancements and performance optimizations for .NET MAUI. However, a big chunk of that would be serving the growing demands of the next-generation of cross-platform desktop apps. As developers get comfortable building robust desktop apps with .NET MAUI, James Montemagno produced a video about a beloved new .NET MAUI feature in .NET 8—keyboard accelerators for desktop apps.

Desktop users often have higher demands—complex apps with busy UI need properly thought out UX. Keyboard-mouse users are also power users—and while mouse pointers are fine, the real hardcore users prefer keyboard shortcuts for optimized way of working. With .NET 8, .NET MAUI caters heavily to modern desktop app development and enables developers to build desktop workflows with menus. And each menu item can now have keyboard accelerators—shortcuts to invoke the menu items through keypress combinations.

Starting from a sample menu, James walks through how developers can add keyboard accelerators easily, either in XAML or through code-behind. The result is a desktop app on Windows/macOS driven by menus for content organization/navigation and easy access to invoke menu items by using the new keyboard accelerators—more power to power desktop users.

Adaptive Icons in .NET MAUI

Adaptive Icons are a crucial aspect of creating a visually appealing and cohesive user experience on Android devices. They ensure a seamless and visually harmonious appearance across all Android devices, accommodating various screen sizes, resolutions and honors user preferences by adapting to system themes. Adaptive Icons promote a unified brand image and future-proofs app against evolving Android platforms/device releases—they simply make sense.

There is good news for .NET developers building cross-platform apps targeting Android and Marcel Luebben wrote up an article—a detailed guide to setting up Adaptive Icons in .NET MAUI for Android.

The first step towards using Adaptive Icons is having them. Developers are encouraged to design their own icon set using a tool like Icon Kitchen. Once they're happy with the set, developers can download the icons and start the process of integrating them inside a .NET MAUI app—using them only for Android and keeping other platforms as is.

Adaptive Icons come in MipMap folders that house the variations across screen densities—developers can copy the contents of the downloaded icon folder into the Platform/Android/Resources directory inside .NET MAUI project. Next up would be embedding the icon files inside .NET MAUI project, adjusting the .csproj to include the files for Android and updating AndroidManifest.xml—Marcel provides a detailed walkthrough of the steps needed.

With a little configuration, developers should now be able to showcase adaptive icon sets for Android, while targeting every other platform as usual from a .NET MAUI app.

That's it for now.

We'll see you next week with more awesome content relevant to .NET MAUI.

Cheers, developers!

About the Author

Sam Basu

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.

Related Posts


Comments are disabled in preview mode.