HelloMauiToolkit
An iOS, Android, macOS + Windows app built using .NET MAUI, demonstrating how to use the .NET MAUI CommunityToolkit
Install / Use
/learn @TheCodeTraveler/HelloMauiToolkitREADME
HelloMauiToolkit
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.
.NET MAUI Community Toolkit: Converters
This specific example uses the ColorToHexRgbStringConverter.
Add UseMauiCommunityToolkit()
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();
// Initialise the toolkit
builder.UseMauiApp<App>().UseMauiCommunityToolkit();
// the rest of your logic...
}
}
Add XAML Namespace
At the top of your XAML file, add the following xmlns
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
Use ColorToHexRgbStringConverter
In your Binding assign Converter={converters:ColorToHexRgbStringConverter}:
Text="{Binding Source={x:Reference ClickMeButton}, Path=BackgroundColor, Converter={toolkit:ColorToHexRgbStringConverter}}
<p align="center">
<img src="https://user-images.githubusercontent.com/13558917/136874004-97d0792d-2561-44e9-afcb-9cc54ee35d02.png" width="500" />
</p>Related Skills
node-connect
349.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
