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 December 11, 2023:

All About .NET 8

The next big milestone for .NET is here with .NET 8 carrying the Long-Term Support (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, AI integration, performance tuning, expressive programming languages, mature tooling and rich ecosystems—it’s a good time to be a .NET developer.

As developers look ahead at the next year before the holidays, it's the perfect time to get a grasp on all things modern .NET with an upcoming Telerik webinar—discover the magic of .NET 8.

The annual .NET releases mark a culmination of year-long engineering efforts, and there is plenty of goodness packed into .NET 8. Modern .NET is open sourced, modular, performant and offers plenty of flexibility in app deployment. Much-hyped technology paradigms all find a home in .NET 8, from containerization, cloud services, cross-platform solutions and ubiquitous use of AI.

One of the biggest benefits of .NET is the rich ecosystem—there is already day-zero .NET 8 support across beloved Telerik .NET UI suites. Come join to see all the wonderfulness with .NET 8 and a glimpse of what the future holds.

.NET MAUI Minutes

.NET MAUI is built to enable .NET developers to create cross-platform apps for Android, iOS, macOS and Windows, with deep native integrations, platform-native UI, and hybrid experiences that extend the reach of Blazor/JS web UI technologies. With increased stability and a rich ecosystem, there are lot more developers building cross-platform apps with .NET MAUI.

Developer attention is precious, though, and knowledge is often best gained in bite sized pieces. Maddy Montaquila has started a new series of short videos for developers called .NET MAUI Minutes and the first one is up—XAML tools in Visual Studio.

While .NET MAUI boasts of cross-platform tooling, it is hard to beat the richness of experience provided in the behemoth of Visual Studio on Windows—the IDE that does it all. Maddy starts off with the default templated .NET MAUI app to show off some XAML tooling built right into the IDE while the app is running. With XAML Hot Reload, XAML Live Preview and Live Visual Tree, developers have all the ammunition needed to get their XAML visual tree markup exactly right.

With precision control over UI element positioning, data binding help and seeing XAML changes live, developers have no reason to be in doubt as to how the .NET MAUI app UI is looking and behaving. Cross-platform app development is complex by nature—powerful visual tooling with .NET MAUI is here to help.

Custom Dialogs

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. .NET MAUI leverages WinUI to reach Windows and MacCatalyst to reach macOS—two well-established UI technology stacks should inspire confidence in building the next generation of desktop apps.

However, desktop apps can have unexpected nuances not directly coded by developers, like the About dialog in a .NET MAUI macOS app. Thankfully, there are ways to manage specific desktop behaviors and Gerald Versluis wrote up an article—how to customize macOS About dialog with .NET MAUI.

Users running .NET MAUI apps on macOS can launch an About dialog screen from menu bar—this shows the default popup with app name and icon. Turns out, Apple provides this dialog for all MacCatalyst apps—but developers can customize the About dialog content. The trick is to drop a Credits.rtf file marked as a BundleResource inside .NET MAUI projects and including it only for macOS—the content of the file is read to render the About dialog.

Developers can further add some app copyright information inside Info.plist file, completely replace About dialog content or remove the menu option altogether—the last two done with edits to the MacCatalyst/AppDelegate.cs file. Overall, developers have the flexibility to customize the .NET MAUI desktop experience down to every detail. Thanks for the writeup, Gerald.

Text Handling

Words matter. Any modern app without text would be practically non-functional. Since text is the way key content is presented in any app, developers need to know how to handle text correctly—this is particularly true for cross-platform mobile/desktop apps written with .NET MAUI. There are many nuances to managing text rendering, but thankfully, Leomaris Reyes wrote up an article—text truncation and wrapping in .NET MAUI apps.

Leomaris starts with the all-important LineBreakMode property—.NET MAUI developers need to understand this to enhance the readability of any rendered text. Simply put, the LineBreakMode property in a Label-type text UI component allows developers to control the wrapping and truncation of rendered text. The property accepts an enumeration, with various choices—like NoWrap, WordWrap, CharacterWrap, HeadTruncation, MiddleTruncation and TailTruncation.

Leomaris walks through the impact of each mode with easy-to-understand explanations and corresponding visuals—the differences are immidiately obvious in mobile/desktop form factors. Text is the fundamental way to present information and .NET MAUI developers will do well understanding the nuances of how text truncates and wraps as app content.

Telerik Extension

.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. And Progress Telerik UI for .NET MAUI continues to be the most comprehensive UI component suite for all .NET MAUI apps—native performant UI controls that work seamlessly across platforms.

There is good news hot off the press, as written up by an aging developer—say hello to Telerik UI for .NET MAUI Productivity Tool for VS Code.

The Telerik .NET MAUI VS Code Extension includes multiple developer productivity features for code generation, configuration and usage help. The Extension includes a new .NET MAUI project template—this provides multiple configuration options for project type/target framework and has Telerik UI already wired up. 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/a shortcut—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 to light up .NET MAUI apps with polished Telerik UI—productivity for the win.

That's it for now.

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

Cheers, developers!


SamBasu
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

Comments are disabled in preview mode.