Introducing the .NET MAUI Community Toolkit (Preview)
source link: https://devblogs.microsoft.com/dotnet/introducing-the-net-maui-community-toolkit-preview/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Introducing the .NET MAUI Community Toolkit (Preview)
Brandon
August 31st, 2021
The Community Toolkit team is excited to announce the first pre-release two new .NET Multi-platform App UI (.NET MAUI) Toolkits:
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:
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
:
- Open a .NET MAUI project in Visual Studio
- In the Visual Studio Package Manager Console, enter the following command:
Install-Package CommunityToolkit.Maui
Install-Package CommunityToolkit.Maui.Markup
- To add the namespace to the toolkit:
- In C#, add the following:
using CommunityToolkit.Maui;
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"
- In C#, add the following:
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:
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.
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!
Brandon Minnick
Developer Advocate, Developer Relations
Follow
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK