MIT License

项目介绍

CommunityToolkit/Maui 是一个托管在 GitHub 上的开源项目,主要使用 C# 编写,采用 MIT License 许可证,目前获得 2.7k 个 Star、492 次 Fork。

仓库全名
CommunityToolkit/Maui
开源许可证
MIT License
Star 数
2.7k
Fork 数
492
未关闭 Issue
164

README 摘要

.NET MAUI Community Toolkit The .NET MAUI Community Toolkit is a collection of common elements for development with .NET MAUI that developers tend to replicate across multiple apps. It simplifies and demonstrates common developer tasks when building apps with .NET MAUI. All features are contributed by you, our amazing .NET community, and maintained by a core set of maintainers. And – the best part – the features you…

完整内容见 GitHub 原始 README 或本页 。

常见问题

Maui 用什么语言开发?

主要使用 C# 编写,采用 MIT License 许可证,目前有 2.7k 个 Star。

Maui 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 Maui 的源码?

可以直接克隆仓库:git clone https://github.com/CommunityToolkit/Maui.git,默认分支为 main;安装与运行步骤见仓库 README。

Maui 最近还在维护吗?

仓库最近一次更新为 1 天前,当前有 164 个未关闭 Issue;Star 数为 2.7k,可作为社区活跃度的参考。

README

..NET Bot .NET Foundation

Build NuGet Downloads

.NET MAUI Community Toolkit

The .NET MAUI Community Toolkit is a collection of common elements for development with .NET MAUI that developers tend to replicate across multiple apps. It simplifies and demonstrates common developer tasks when building apps with .NET MAUI.

All features are contributed by you, our amazing .NET community, and maintained by a core set of maintainers.

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.

Documentation

image

All of the documentation for CommunityToolkit.Maui can be found here on Microsoft Learn:

https://learn.microsoft.com/dotnet/communitytoolkit/maui/get-started

Installation

The release versions of .NET MAUI Community Toolkit are available at Nuget.org as NuGet packages. You can install them using the following commands in your terminal or Package Manager Console:

dotnet add package CommunityToolkit.Maui
dotnet add package CommunityToolkit.Maui.MediaElement
dotnet add package CommunityToolkit.Maui.Maps
dotnet add package CommunityToolkit.Maui.Camera

Install Prerelease

You can also try the latest pre-release version of the main branch. We use GitHub Packages to host the pre-release versions of the .NET MAUI Community Toolkit. To install the pre-release version, you need to add the GitHub Packages source to your NuGet configuration. GitHub Packages only supports authentication using a personal access token (classic) (https://github.com/settings/tokens). For more information, see Managing your personal access tokens. You can use a personal access token (classic) to authenticate to GitHub Packages. When you create a personal access token (classic), you can assign the token different scopes depending on your needs, but read:packages is enough.

dotnet nuget add source https://nuget.pkg.github.com/CommunityToolkit/index.json -n CommunityToolkitGitHubNuget -u YOUR_GITHUB_USERNAME -p YOUR_GITHUB_PERSONAL_ACCESS_TOKEN

and then install the packages as follows:

dotnet add package CommunityToolkit.Maui --version 99.0.0-preview980
dotnet add package CommunityToolkit.Maui.MediaElement --version 99.0.0-preview980
dotnet add package CommunityToolkit.Maui.Maps --version 99.0.0-preview980
dotnet add package CommunityToolkit.Maui.Camera --version 99.0.0-preview980

Getting Started

In order to use the .NET MAUI Community Toolkit you need to call the extension method in your MauiProgram.cs file as follows:

using CommunityToolkit.Maui;

public static class MauiProgram
{
	public static MauiApp CreateMauiApp()
	{
		var builder = MauiApp.CreateBuilder();
		builder
			.UseMauiApp<App>()
			// Initialize the .NET MAUI Community Toolkit by adding the below line of code
			.UseMauiCommunityToolkit()
			// After initializing the .NET MAUI Community Toolkit, optionally add additional fonts
			.ConfigureFonts(fonts =>
			{
				fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
				fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
			});

		// Continue initializing your .NET MAUI App here

		return builder.Build();
	}
}

XAML usage

In order to make use of the toolkit within XAML you can use this namespace:

xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"

Roadmap / Plan

All work carried out on the toolkit is done so by the community and the core maintainers in our spare time on nights and weekends. Due to this reason we do not have a concrete plan on when features will be added and delivered. What we do have is a list of proposals and a Project board which summarises they states. Please feel free to check them out and jump in to providing any assistance that you feel you can.

Submitting A New Feature

New features will follow the below workflow, described in more detail in the steps below

New Feature Workflow

1. Discussion Started

Debate pertaining to new Maui Toolkit features takes place in the form of Discussions in this repo.

If you want to suggest a feature, discuss current design notes or proposals, etc., please open a new Discussion topic.

Discussions that are short and stay on topic are much more likely to be read. If you leave comment number fifty, chances are that only a few people will read it. To make discussions easier to navigate and benefit from, please observe a few rules of thumb:

  • Discussion should be relevant to the .NET MAUI Toolkit. If they are not, they will be summarily closed.
  • Choose a descriptive topic that clearly communicates the scope of discussion.
  • Stick to the topic of the discussion. If a comment is tangential, or goes into detail on a subtopic, start a new discussion and link back.
  • Is your comment useful for others to read, or can it be adequately expressed with an emoji reaction to an existing comment?

2. Proposal Submitted

Once you have a fully fleshed out proposal describing a new feature in syntactic and semantic detail, please open an issue for it, and it will be labelled as a Proposal. The comment thread on the issue can be used to hash out or briefly discuss details of the proposal, as well as pros and cons of adopting it into the .NET MAUI Toolkit. If an issue does not meet the bar of being a full proposal, we may move it to a discussion, so that it can be further matured. Specific open issues or more expansive discussion with a proposal will often warrant opening a side discussion rather than cluttering the comment section on the issue.

3. Proposal Championed

When a member of the .NET MAUI Toolkit core team finds that a proposal merits promotion into the Toolkit, they can Champion it, which means that they will bring it to the monthly .NET MAUI Toolkit Community Standup.

4. Proposal Approved

The .NET MAUI Toolkit core team will collectively vote to work on adopting and/or modifying the proposal, requiring a majority approval (i.e. greater than 50%) to be added to the Toolkit.

Once a Proposal has been championed and has received a majority approval from the .NET MAUI Toolkit core team, a Pull Request can be opened.

5. Pull Request Approved

After a Pull Request has been submitted, it will be reviewed and approved by the Proposal Champion.

Every new feature also requires an associated sample to be added to the .NET MAUI Toolkit Sample app.

6. Documentation Complete

Before a Pull Request can be merged into the .NET MAUI Toolkit, the Pull Request Author must also submit the documentation to documentation repository.

7. Completed

Once a Pull Request has been reviewed + approved AND the documentation has been written, submitted and approved, the new feature will be merged adding it to the .NET MAUI Toolkit

Code of Conduct

As a part of the .NET Foundation, we have adopted the .NET Foundation Code of Conduct. Please familiarize yourself with that before participating with this repository. Thanks!

.NET Foundation

This project is supported by the .NET Foundation.

评论

暂无评论