Introducing the .NET MAUI Community Toolkit (Preview)

The Community Toolkit team is excited to announce the first pre-release two new .NET Multi-platform App UI (.NET MAUI) Toolkits:

CommunityToolkit.Maui
CommunityToolkit.Maui.Markup

As announced last month, these libraries are the evolution of the Xamarin Community Toolkits. They contain .NET MAUI Extensions, Advanced UI/UX Controls, Effects, and Behaviors to help make your life as a .NET MAUI developer easier.

These features are contributed by you, our amazing .NET community, and maintained by a core set of maintainers (see “Focus On Community”, below).

And – the best part – the features you add to the .NET MAUI Toolkit may one day be included into the official .NET MAUI library! We leverage the Community Toolkits to debut new features and work closely with the .NET MAUI engineering team to nominate features for promotion.

What to Expect in .NET MAUI Toolkit

The .NET MAUI Toolkit does not yet include all of the amazing community contributions from the Xamarin Community Toolkit. We are actvely porting them from Xamarin.Forms to .NET MAUI and they will be available in upcoming releases (see “Schedule”, below).

The .NET MAUI Toolkit will not contain the MVVM features from Xamarin Community Toolkit, like AsyncCommand. Going forward, we will be adding all MVVM-specifc features to a new NuGet Package, CommunityToolkit.MVVM.

What to Expect in .NET MAUI Markup Toolkit

The .NET MAUI Markup Toolkit allows developers to continue architecting their apps using MVVM, Bindings, Resource Dictionaries, etc., without the need for XAML:

Fluent C# UI Extensions
Create your .NET MAUI UI in C# using MVVM (no XAML)

The .NET MAUI Markup Toolkit contains all of the C# UI extension methods from the Xamarin Community Toolkit.

Here are examples from my open-source HackerNews app:

ContentPage
DataTemplate

Link to Source Code
Link to Source Code

Docs

We have teamed up with the Microsoft Docs team to find a new home for all of the Community Toolkit documentation. Stay tuned for future updates when we announce the new location of the Community Toolkit docs on docs.microsoft.com.

Getting Started

Both MauiCompat libraries are available as a NuGet package that can be added to any .NET 6 project targeting net6.0-ios and net6.0-android:

CommunityToolkit.Maui
CommunityToolkit.Maui.Markup

NuGet Package
https://www.nuget.org/packages/CommunityToolkit.Maui/
https://www.nuget.org/packages/CommunityToolkit.Maui.Markup/

Open a .NET MAUI project in Visual Studio
In the Visual Studio Package Manager Console, enter the following command:
Install-Package CommunityToolkit.Maui

or

Install-Package CommunityToolkit.Maui.Markup

To add the namespace to the toolkit:

In C#, add the following:
using CommunityToolkit.Maui;

or

using CommunityToolkit.Maui.Markup;

In XAML, add the following:
xmlns=”https://schemas.microsoft.com/dotnet/2021/maui”
xmlns:behaviors=”clr-namespace:CommunityToolkit.Maui.Behaviors;assembly=CommunityToolkit.Maui”
xmlns:converters=”clr-namespace:CommunityToolkit.Maui.Converters;assembly=CommunityToolkit.Maui”
xmlns:effects=”clr-namespace:CommunityToolkit.Maui.Effects;assembly=CommunityToolkit.Maui”
xmlns:views=”clr-namespace:CommunityToolkit.Maui.Views;assembly=CommunityToolkit.Maui”

Focus on Community

While these libraries are built in collaboration with the .NET team at Microsoft, it is truly a community effort. The core team, Andrei Misiukevich, Pedro Jesus, Gerald Versluis, Javier Suárez, and (myself) Brandon Minnick, are here mostly to move things forward.

Your help and input is very much required. Whether that is through triaging issues, updating Docs, participating in discussions or adding actual code, we will need your help!

Starting in November, following the first offical release (aka non pre-release) of .NET MAUI Community Toolkit, we encourage you to open Feature Requests and Proposals to add your favorite .NET MAUI extensions to the toolkit:

.NET MAUI Community Toolkit GitHub Repository
.NET MAUI Markup Community Toolkit GitHub Repository

Once your proposal has been approved, you will be welcome to submit a Pull Request adding your own feature to the toolkit!

Schedule

The .NET MAUI Community Toolkit will GA alongside .NET MAUI and .NET 6 in November 2021.

Date
Milestone

August 2021
First NuGet Pre-Release of CommunityToolkit.Maui

August 2021
First NuGet Pre-Release of CommunityToolkit.Maui.Markup

September 2021
Second NuGet Pre-Release of CommunityToolkit.Maui

September 2021
Second NuGet Pre-Release of CommunityToolkit.Maui.Markup

October 2021
Third NuGet Pre-Release of CommunityToolkit.Maui

October 2021
Third NuGet Pre-Release of CommunityToolkit.Maui.Markup

November 2021
.NET MAUI GA

November 2021

CommunityToolkit.Maui GA

November 2021
Begin Accepting New Proposals + Feature Requests for CommunityToolit.Maui

November 2021

CommunityToolkit.Maui.Markup GA

November 2021
Begin Accepting New Proposals + Feature Requests for CommunityToolit.Maui.Markup

Summary

The .NET MAUI Community Toolkits are still a work in progress, but we wanted to share our progress with you today!

As you begin your journey in .NET MAUI, try out the Toolkits, open proposals on our GitHub repositories, join the discussions and help us make the best Toolkits for the community!

The post Introducing the .NET MAUI Community Toolkit (Preview) appeared first on .NET Blog.

Leave a Reply

Your email address will not be published. Required fields are marked *