Xamarin.CommunityToolkit: an introduction to a great new supporting library for Xamarin.Forms
Today I can proudly introduce to you the XamarinCommunityToolkit package! In this post you will read all about this package (also known as XamarinCommunityToolkit). What it does, my vision for it and how you can use it, today!
Want to learn about the Toolkit a bit more in-depth? Check out this video! Don’t for get to subscribe…
A Bit of History #
Actually, to be honest, I am not sure of the entire history. I see that the first commit is from December 22nd 2016 by our best friend in the entire world; James Montemagno. Probably as a Xamarin.Forms counterpart to the Windows Community Toolkit, which has been around for a while and has some impressive development.
Unfortunately, it seems the XamarinCommunityToolkit has not seen much action and faded away quickly. Recently though, we were asked if we maybe wanted to revive this great initiative. Who “we” are is something I will get to in a second. And the answer was an unmistakable: of course!
In the past month or so we have been working hard to cleanup the repository, make an inventory of what we want to add in here, start with a fresh code base and most importantly: get our infrastructure up to be able to push NuGet packages as fast as possible.
The Vision for the XamarinCommunityToolkit #
I don’t know if this is the vision, I know it’s mine. What I want out of this package is a couple of things.
- Low threshold project where everyone should feel welcome to contribute
- Core team that is willing and able to help you with the above
- Aggregate much used code (converters, animations, behaviors, effects, and even controls) that users copy & paste/reinvent over and over again
- Provide a nursery for controls and other concepts to prove themselves and maybe be upgraded to Forms/.NET MAUI from there
- Provide a single library (not necessarily a single binary) under the Microsoft name to ease your compliance needs
- Have fun & learn!
Who is Driving This? #
The answer to that is basically: YOU!
This package is all about community. We would love to see our (already supporting and great) community contribute to this with all the code that you want to share with us. And of course not stop there, we also have a spot on the official Docs that needs some filing, help us by doing reviews, creating issues with detailed specs of what you’d like to see, etc.
But as you might understand it comes in handy to have a couple of core people that can help move things along and keep their eye on it. That is why we have a core team that consists of mostly community members, and a couple of Microsoft employees that have some rights in the right systems.
Core Team #
If you have been using Xamarin.Forms, I think there will be a couple of names that sound familiar.
- Andrei Misiukevich
- Charlin Agramonte
- Glenn Versweyveld
- Jean-Marie Alfonsi
- Steven Thewissen
- Javier Suárez (Microsoft, Xamarin.Forms team)
- Me! (Microsoft)
These fine people are all here to keep an eye on things. If you want to reach out to us, you can use the DotNetEvolution Discord. We are in the xamarin-community-toolkit
channel. We of course also have a code of conduct in place. If you find anything not in order to that regard, please feel free to reach out to any of us in private, we are all glad to help and address your concerns.
What’s in the XamarinCommunityToolkit Box?! #
I am writing this post because we have just released version 1.0.0-pre1 (see update at the top). Because we are still setting up, I don’t have any formal release notes or anything yet, but this is what we have in this pre-release right now:
Behaviors #
A whole bunch of behaviors!
- Email validation
- Event to Command (!!)
- Numeric validation
- Text validation
- Animations
Controls #
- RangeSlider
- AvatarView
AvatarView in action
Converters #
Need another shape or form? You’ve come to the right place
- BoolToObject
- DoubleToInt
- Equal
- IndexToArray
- IntToBool
- InvertedBool
- IsNotNullOrEmpty
- IsNullOrEmpty
- ItemSelectedEventArgs
- ItemTappedEventArgs
- ListIsNotNullOrEmpty
- ListIsNullOrEmpty
- MultiConverter
- NotEqual
- TextCase
Effects #
- SafeAreaEffect
Markup Extensions #
- ImageResourceExtension
- ValueConverterExtension
I would say that is pretty complete already! But this is just a pre-release 🤯
Get Started with XamarinCommunityToolkit Today #
You can start with all of this today, the first pre-release is on NuGet (see update at thee top) and we have a nightly feed as well. If you want to learn how to use that, see this earlier post.
We would love to see your contributions, a great way to start would be to look at the contributing doc. If you need any help getting started, please let me know. I will be glad to assist.