{"id":34159,"date":"2021-08-31T09:00:43","date_gmt":"2021-08-31T16:00:43","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=34159"},"modified":"2021-08-31T12:26:00","modified_gmt":"2021-08-31T19:26:00","slug":"introducing-the-net-maui-community-toolkit-preview","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/introducing-the-net-maui-community-toolkit-preview\/","title":{"rendered":"Introducing the .NET MAUI Community Toolkit (Preview)"},"content":{"rendered":"<p>The Community Toolkit team is excited to announce the first pre-release two new .NET Multi-platform App UI (.NET MAUI) Toolkits:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.nuget.org\/packages\/CommunityToolkit.Maui\/\"><code>CommunityToolkit.Maui<\/code><\/a><\/li>\n<li><a href=\"https:\/\/www.nuget.org\/packages\/CommunityToolkit.Maui.Markup\/\"><code>CommunityToolkit.Maui.Markup<\/code><\/a><\/li>\n<\/ul>\n<p>As <a href=\"https:\/\/devblogs.microsoft.com\/xamarin\/the-future-of-xamarin-community-toolkit\/?WT.mc_id=mobile-39516-bramin\">announced last month<\/a>, these libraries are the evolution of the <a href=\"https:\/\/github.com\/xamarin\/xamarincommunitytoolkit\">Xamarin Community Toolkits<\/a>. They contain .NET MAUI Extensions, Advanced UI\/UX Controls, Effects, and Behaviors to help make your life as a .NET MAUI developer easier.<\/p>\n<p>These features are contributed by you, our amazing .NET community, and maintained by a core set of maintainers <a href=\"#focus-on-community\">(see &#8220;Focus On Community&#8221;, below)<\/a>.<\/p>\n<p>And &#8211; the best part &#8211; 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.<\/p>\n<h2>What to Expect in .NET MAUI Toolkit<\/h2>\n<p>The .NET MAUI Toolkit does not yet include all of the amazing community contributions from the <a href=\"https:\/\/github.com\/xamarin\/xamarincommunitytoolkit\">Xamarin Community Toolkit<\/a>. We are actvely porting them from Xamarin.Forms to .NET MAUI and they will be available in upcoming releases <a href=\"#schedule\">(see &#8220;Schedule&#8221;, below)<\/a>.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2021\/08\/MauiToolkit.png\" alt=\"Maui Toolkit Features\" \/><\/p>\n<p>The .NET MAUI Toolkit will not contain the MVVM features from Xamarin Community Toolkit, like <a href=\"https:\/\/channel9.msdn.com\/Shows\/XamarinShow\/Xamarin-Community-Toolkit-Awesome-AsyncCommand--AsyncValueCommand?WT.mc_id=mobile-39516-bramin\"><code>AsyncCommand<\/code><\/a>. Going forward, we will be adding all MVVM-specifc features to a new NuGet Package, <code>CommunityToolkit.MVVM<\/code>.<\/p>\n<h2>What to Expect in .NET MAUI Markup Toolkit<\/h2>\n<p>The .NET MAUI Markup Toolkit allows developers to continue architecting their apps using MVVM, Bindings, Resource Dictionaries, etc., without the need for XAML:<\/p>\n<ul>\n<li>Fluent C# UI Extensions<\/li>\n<li>Create your .NET MAUI UI in C# using MVVM (no XAML)<\/li>\n<\/ul>\n<p>The <a href=\"https:\/\/github.com\/communitytoolkit\/maui.markup\">.NET MAUI Markup Toolkit<\/a> contains all of the C# UI extension methods from the <a href=\"https:\/\/github.com\/xamarin\/xamarincommunitytoolkit\">Xamarin Community Toolkit<\/a>.<\/p>\n<p>Here are examples from my <a href=\"https:\/\/github.com\/brminnick\/HackerNews\/\">open-source HackerNews app<\/a>:<\/p>\n<table>\n<thead>\n<tr>\n<th>ContentPage<\/th>\n<th>DataTemplate<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/github.com\/brminnick\/HackerNews\/blob\/5e93c31c6d806167ce01ad15fd6297c2014c6d96\/HackerNews\/HackerNews\/Pages\/NewsPage.cs#L13-L32\">Link to Source Code<\/a><\/td>\n<td><a href=\"https:\/\/github.com\/brminnick\/HackerNews\/blob\/5e93c31c6d806167ce01ad15fd6297c2014c6d96\/HackerNews\/HackerNews\/Views\/News\/StoryDataTemplate.cs#L8-L33\">Link to Source Code<\/a><\/td>\n<\/tr>\n<tr>\n<td><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2021\/08\/markupextensions_contentpage.png\" alt=\"ContentPage\" \/><\/td>\n<td><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2021\/08\/markupextensions_datatemplate.png\" alt=\"ContentPage\" \/><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Docs<\/h3>\n<p>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 <a href=\"https:\/\/docs.microsoft.com\">docs.microsoft.com<\/a>.<\/p>\n<h2>Getting Started<\/h2>\n<p>Both <code>MauiCompat<\/code> libraries are available as a NuGet package that can be added to any .NET 6 project targeting <code>net6.0-ios<\/code> and <code>net6.0-android<\/code>:<\/p>\n<table>\n<thead>\n<tr>\n<th><\/th>\n<th><strong>CommunityToolkit.Maui<\/strong><\/th>\n<th><strong>CommunityToolkit.Maui.Markup<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>NuGet Package<\/td>\n<td>https:\/\/www.nuget.org\/packages\/CommunityToolkit.Maui\/<\/td>\n<td>https:\/\/www.nuget.org\/packages\/CommunityToolkit.Maui.Markup\/<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ol>\n<li>Open a .NET MAUI project in Visual Studio<\/li>\n<li>In the <a href=\"https:\/\/docs.microsoft.com\/nuget\/consume-packages\/install-use-packages-powershell#opening-the-console-and-console-controls?WT.mc_id=mobile-39516-bramin\">Visual Studio Package Manager Console<\/a>, enter the following command:\n<pre><code class=\"language-bash\">Install-Package CommunityToolkit.Maui<\/code><\/pre>\n<p>or<\/p>\n<pre><code class=\"language-bash\">Install-Package CommunityToolkit.Maui.Markup<\/code><\/pre>\n<\/li>\n<li>To add the namespace to the toolkit:\n<ul>\n<li>In C#, add the following:\n<pre><code class=\"language-csharp\">using CommunityToolkit.Maui;<\/code><\/pre>\n<p>or<\/p>\n<pre><code class=\"language-csharp\">using CommunityToolkit.Maui.Markup;<\/code><\/pre>\n<\/li>\n<li>In XAML, add the following:\n<pre><code class=\"language-xml\">xmlns=\"https:\/\/schemas.microsoft.com\/dotnet\/2021\/maui\"\r\nxmlns:behaviors=\"clr-namespace:CommunityToolkit.Maui.Behaviors;assembly=CommunityToolkit.Maui\"\r\nxmlns:converters=\"clr-namespace:CommunityToolkit.Maui.Converters;assembly=CommunityToolkit.Maui\"\r\nxmlns:effects=\"clr-namespace:CommunityToolkit.Maui.Effects;assembly=CommunityToolkit.Maui\"\r\nxmlns:views=\"clr-namespace:CommunityToolkit.Maui.Views;assembly=CommunityToolkit.Maui\"<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h2>Focus on Community<\/h2>\n<p>While these libraries are built in collaboration with the .NET team at Microsoft, it is truly a community effort. The core team, <a href=\"https:\/\/twitter.com\/Andrik_Just4Fun\">Andrei Misiukevich<\/a>, <a href=\"https:\/\/twitter.com\/pj_souz\">Pedro Jesus<\/a>, <a href=\"https:\/\/twitter.com\/jfversluis\">Gerald Versluis<\/a>, <a href=\"https:\/\/twitter.com\/jsuarezruiz\">Javier Su\u00e1rez<\/a>, and (myself) <a href=\"https:\/\/twitter.com\/TheCodeTraveler\">Brandon Minnick<\/a>, are here mostly to move things forward.<\/p>\n<p>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!<\/p>\n<p>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:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/communityToolkit\/Maui\/\">.NET MAUI Community Toolkit GitHub Repository<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/communityToolkit\/Maui.Markup\">.NET MAUI Markup Community Toolkit GitHub Repository<\/a><\/li>\n<\/ul>\n<p>Once your proposal has been approved, you will be welcome to submit a Pull Request adding your own feature to the toolkit!<\/p>\n<h2>Schedule<\/h2>\n<p>The .NET MAUI Community Toolkit will GA alongside .NET MAUI and .NET 6 in November 2021.<\/p>\n<table>\n<thead>\n<tr>\n<th><strong>Date<\/strong><\/th>\n<th><strong>Milestone<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>August 2021<\/td>\n<td>First NuGet Pre-Release of <code>CommunityToolkit.Maui<\/code><\/td>\n<\/tr>\n<tr>\n<td>August 2021<\/td>\n<td>First NuGet Pre-Release of <code>CommunityToolkit.Maui.Markup<\/code><\/td>\n<\/tr>\n<tr>\n<td>September 2021<\/td>\n<td>Second NuGet Pre-Release of <code>CommunityToolkit.Maui<\/code><\/td>\n<\/tr>\n<tr>\n<td>September 2021<\/td>\n<td>Second NuGet Pre-Release of <code>CommunityToolkit.Maui.Markup<\/code><\/td>\n<\/tr>\n<tr>\n<td>October 2021<\/td>\n<td>Third NuGet Pre-Release of <code>CommunityToolkit.Maui<\/code><\/td>\n<\/tr>\n<tr>\n<td>October 2021<\/td>\n<td>Third NuGet Pre-Release of <code>CommunityToolkit.Maui.Markup<\/code><\/td>\n<\/tr>\n<tr>\n<td>November 2021<\/td>\n<td>.NET MAUI GA<\/td>\n<\/tr>\n<tr>\n<td>November 2021<\/td>\n<td><code>CommunityToolkit.Maui<\/code> GA<\/td>\n<\/tr>\n<tr>\n<td>November 2021<\/td>\n<td>Begin Accepting New Proposals + Feature Requests for <code>CommunityToolit.Maui<\/code><\/td>\n<\/tr>\n<tr>\n<td>November 2021<\/td>\n<td><code>CommunityToolkit.Maui.Markup<\/code> GA<\/td>\n<\/tr>\n<tr>\n<td>November 2021<\/td>\n<td>Begin Accepting New Proposals + Feature Requests for <code>CommunityToolit.Maui.Markup<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Summary<\/h2>\n<p>The .NET MAUI Community Toolkits are still a work in progress, but we wanted to share our progress with you today!<\/p>\n<p>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!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Announcing the first preview release of the .NET MAUI Community Toolkit<\/p>\n","protected":false},"author":568,"featured_media":34160,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[685,7233],"tags":[4,7246,7248,51,7242,63,7245,7247,7244,7243,162,7249],"class_list":["post-34159","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-maui","tag-net","tag-android","tag-catalyst","tag-community","tag-communitytoolkit","tag-dotnet","tag-ios","tag-maccatalyst","tag-maui","tag-toolkit","tag-xamarin","tag-xamarincommunitytoolkit"],"acf":[],"blog_post_summary":"<p>Announcing the first preview release of the .NET MAUI Community Toolkit<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/34159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/568"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=34159"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/34159\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/34160"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=34159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=34159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=34159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}