This content originally appeared on Telerik Blogs and was authored by Sam Basu
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 towards developer knowledge in .NET MAUI and we grow a community/ecosystem willing to learn & 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 April 10, 2023:
.NET MAUI Community Standup
Maddy Montaquila and David Ortinau recently hosted April's .NET MAUI Community Standup—this was a fun one. Before getting down to business, they shared the excitement about Build—the first big Microsoft in-person and digital developer conference coming up this summer.
Maddy shared a whole bunch of community content that relate to .NET MAUI development—from Async/Await internals, Community Toolkit updates, migration from Xamarin.Forms, unit testing, ChatGPT client, increasing presence of AI in developer tooling and much more. David covered a lot of tooling updates—well-architected sample apps, useful libraries, support for NuGet packages delivering .NET MAUI workload bits with .NET 8 Previews and the overall prioritization of .NET MAUI developer tooling stability.
Maddy and David were then joined by special guest Dante Gagne, Product Manager for Visual Studio. Dante and team have put years of work into improving accessibility and now the fruits of labor are baked right inside developer tooling—the new built-in production-ready Accessibility Checker inside Visual Studio.
VS aims to be the inclusive developer tool/IDE for everyone and wants to help developers build more accessible apps for users. Microsoft has an open source tool call Accessibility Insights that can scan apps for common A11Y mistakes—much of that goodness is now baked into Visual Studio and available to assist .NET MAUI developers build more accessible apps.
Dante showed off a cool demo of running a .NET MAUI app with Accessibility Checker—it is meant to immediately point out the obvious A11Y misses, like lack of semantic properties or potential screen reader/speech recognition issues. The Accessibility Checker steps developers right into the live visual tree of XAML markup—there is no more an excuse to not fully support accessibility in .NET MAUI apps.
Image Editing in .NET MAUI
Images are everywhere in our today's world—they bring rich visuals and interactivity to any app. And modern native mobile/desktop apps should allow offer easy editing of images, just to make sure social media influencers do not have a rough day. Thankfully for .NET MAUI developers, image editing can happen within the app without any external service/software dependencies and Viktoria Grozdancheva wrote up an article—editing images on the Maui shoreline.
With the early 2023 release, Telerik UI for .NET MAUI has had a precious new addition—the first built-in image editing UI component for .NET MAUI developers. The core benefit of the Telerik .NET MAUI Image Editor is to help developers build modern experiences allowing users to visualize and manipulate rich visual content—for consistent but catered UX on mobile/desktop.
Viktoria starts off loading up a simple image in the Telerik .NET MAUI Image Editor, but is quick to point out the various other ways to load images within apps. There is a built-in ImageEditor Toolbar that is ready to use with common pre-populated actions needed to manipulate images.
Viktoria gets to must-have image editing features next—resize, crop, zoom, flip and rotate are all ready to light up rich user experiences. To get developers excited, Viktoria also showcases something cute that shows off the power of the Telerik .NET MAUI Image Editor—a custom toolbar with Undo, Redo and a heart-shaped crop utility powered by built-in geometry.
Developers should feel empowered to create rich visual image editing experiences for end users—thanks Viktoria for the inspiration.
Xamarin.Forms Migration
.NET MAUI is the direct evolution of Xamarin.Forms, taking .NET code to not just iOS/Android but also to Windows/macOS. While .NET MAUI is the future of cross-platform development on .NET, for many teams/individuals, Xamarin.Forms is very much the reality today.
Thankfully, investments in Xamarrin.Forms move forward nicely, but there are some nuances to understand and plot the migration to .NET MAUI. Rossitza Fakalieva has some advice and wrote up the second part of the article series—planning considerations for migration from Xamarin.Forms to .NET MAUI.
Rossi lays down some realistic things to consider as developers plot the migration from Xamarin.Forms to .NET MAUI—getting set up with tools, reviewing app architecture, deciding on navigation and analyzing dependencies. .NET MAUI now boasts stable Visual Studio tooling on both Windows and macOS and the .NET Upgrade Assistant tool can really help in automating migrations.
Developers should review and decide on the app's architecture going forward - data models, navigation, design patterns, cloud usage and platform integrations. Rossi points out that the important consideration would be the app's dependencies—libraries and NuGet packages need to be supported in .NET 6 forward. If developers have written custom Renderers for Xamarin.Forms, they can be brought in as is in .NET MAUI with Compatibility mode, but the right thing would be to migrate them to be .NET MAUI Handlers.
.NET MAUI came out with .NET 6, matured with .NET 7 and is looking ahead to flourish with .NET 8—hopefully, developers and apps can follow the natural evolution of Xamarin.Forms apps to .NET MAUI, sooner than later.
Files/Folders with .NET MAUI
Native mobile apps often deal with file system access and desktop apps go a step further working with folders. However, the routine task of file/folder access often involves writing tedious platform-specific code. Thankfully, with .NET MAUI Community Toolkit, developer frustration is a thing of the past and Vladislav Antonyuk wrote up a wonderful article—File & Folder dialogs in .NET MAUI with CommunityToolkit.
Vladislav gets straight to the point: The new CommunityToolkit.Maui version 5.0 now contains enhanced versions of FolderPicker and FileSaver—they provide an easy way to select target folders and save files to the filesystem across all .NET MAUI platforms. The updated FileSaver API allows developers to offer users a convenient dialog to save any file type, including documents, images and videos, to a chosen destination folder.
The new FolderPicker API is another powerful capability that allows users to select folders in the filesystem using an UI dialog and get most pertinent information about the selected folder. Vladislav showcases functionality with easy to follow examples—with just a few lines of abstracted C# code, developers now have complete freedom to offer rich file/folder access to users and everything just works consistently across .NET MAUI supported mobile/desktop platforms.
All this is enabled by the latest .NET MAUI Community Toolkit—cheers to all the contributors for making lives easy for fellow .NET MAUI developers.
Color Property Animations
When users interact with apps, subtle changes in visual element styling can add to a positive UX—it lets the user know that their actions were registered and something is happening in the app. Changing visual element colors with small animations is easy, thanks to the .NET MAUI Community Toolkit and Leomaris Reyes wrote up an article about it—animating color properties using .NET MAUI Community Toolkit.
The classic use case of color property animations is when the user interacts with a visual element, a subtle animation highlights the action and color change indicates something is happening in the app—there is help for developers wanting to implement such UX. The .NET MAUI Community Toolkit is a collection of UI elements and reusable code such as animations, behaviors and converters—it simply aims to make .NET MAUI developers more productive.
Leomaris starts out explaining Color Animation Extensions—these extension methods enable developers to animate the properties related to the colors of a visual element. A UI element's BackgroundColor and TextColor can be easily tweaked and the extension methods accept parameters that allow for thorough customization, like selected color, animation rate, animation length and easing functions.
That's it for now.
We'll see you next week with more awesome content relevant to .NET MAUI.
Cheers, developers!
This content originally appeared on Telerik Blogs and was authored by Sam Basu
Sam Basu | Sciencx (2023-04-10T16:51:27+00:00) Sands of MAUI: Issue #98. Retrieved from https://www.scien.cx/2023/04/10/sands-of-maui-issue-98/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.