I was recently asked by @mattgoldman if I’d like to put together a post for https://twitter.com/hashtag/MAUIUIJuly. After struggling for some inspiration recently for posts I figured this is the perfect
excuse opportunity to jump back into it.
For those of you living under a rock and aren’t quite sure what .NET MAUI is and why you want to use it. Lets start with what is .NET MAUI.
What is .NET MAUI
Simply speaking MAUI stands for Multi-platform App UI. This is Microsoft’s attempt at a cross-platform native application framework. Think of it as a replacement for Xamarin.Forms. I’m not going to go through the How’s and Why’s of using .NET MAUI, there are already some great resources out there, check out the #MAUIUIJuly hashtag, Matt’s even working on the MAUI in action book.
Have you ever found yourself building a rich UI application, be it, WPF, UWP, Angular, React or mobile and find yourself searching for a seemingly standard control in the native framework that just doesn’t exist? So you end up either:
- (re)Writing your own
- Finding an unmaintained repository, that doesn’t quite work how you want it to.
I know I’ve found myself implementing, and reimplementing simple binding converters, layout panels, and alert popups.
Thankfully, Microsoft has been facilitating community-based toolkits for their frameworks for as long as I can remember (at least back to when I was heavily focused on WPF). These toolkits are home to the reusable components and elements that everyone needs but don’t really belong in the underlying framework.
.NET MAUI Community Toolkit
The .NET MAUI Community Toolkit is one such toolkit that is invaluable for .NET MAUI app development.
To get started the official Docs are found here whilst the repo is on GitHub. First and foremost, as this is a community-based toolkit there are rich discussions, as well as guidelines on how to contribute and participate. As well as the monthly standup on youtube.
What’s in it?
There are a plethora of converters from IntToBoolConverter and InvertedBooleanConverter to many different Color converters. Before you decide to roll your own Color to RGB string converter (or any other everyday converter) be sure to check out the offerings already available in the Community Toolkit.
These are common controls that almost all Apps I’ve written use, and I’ve created more than alerts controls than I’d like to admit (across WPF, Angular and React), or had to wrangle from other open source projects. The .NET MAUI Community Toolkit provides 2 simple to use alert options: Snackbars and Toast
As it stands now there is only a UniformItemsLayout, this handy layout control allows you to easily create a layout that uniformly places all child elements.
The .NET MAUI Community Toolkit is a valuable package for any .NET MAUI Application. the rich discussions and community will mean that the highlights I’ve mentioned above will soon be outdated, so be sure to keep an eye on the discussions, and the monthly standup.