CommunityToolkit.WinUI
WinUI Community Toolkit (C++ Port)
Install / Use
/learn @lgztx96/CommunityToolkit.WinUIREADME
WinUI Community Toolkit (C++ Port)
This repository contains C++ ports of CommunityToolkit components.
The goal is to allow seamless usage of these controls in WinUI 3 / C++ projects.
NuGet Packages
You can install the C++ WinUI Community Toolkit packages via NuGet (it also supports .NET):
| Package | NuGet |
|---------|-------|
| XamlToolkit.WinUI.Native | |
| XamlToolkit.WinUI.Helpers.Native |
|
| XamlToolkit.WinUI.Converters.Native |
|
| XamlToolkit.WinUI.Media.Native |
|
| XamlToolkit.WinUI.Controls.Native |
|
| XamlToolkit.WinUI.Animations.Native |
|
| XamlToolkit.Labs.WinUI.Native |
|
| XamlToolkit.WinUI.Rive.Native |
|
Note: When using the C# version, make sure to set the <TargetFramework> to:
<TargetFramework>net8.0-windows10.0.26100.0</TargetFramework>
Controls
RivePlayer

Rive support is available via XamlToolkit.WinUI.Rive, an optional sub-project maintained in its own repository. See the repository for details.
Adorner / ResizeElementAdorner

ColorAnalyzer

DataTable

MarkdownTextBlock
MarkdownTextBlock supports syntax highlighting for C#, C++, XML, JSON, Bash and Rust.

Marquee

OpacityMaskView

Ribbon

Shimmer

TokenView

ColorPicker / ColorPickerButton

DockPanel

ImageCropper

LayoutTransformControl

MetadataControl

HeaderedContentControl / HeaderedItemsControl / HeaderedTreeView

ConstrainedBox

RadialGauge
:warning: The ValueStringFormat property does not support .NET string format syntax and only supports std::format syntax.

RangeSelector

RichSuggestBox

Segmented

SettingsCard / SettingsExpander

ContentSizer / GridSplitter / PropertySizer

StaggeredLayout / StaggeredPanel

SwitchPresenter

TabbedCommandBar

TokenizingTextBox

UniformGrid

WrapPanel / WrapPanel2

AttachedDropShadow / AttachedCardShadow

Animations
ImplicitAnimations / ExplicitAnimations / ShadowAnimations

Features
- Native C++/WinRT implementation for WinUI 3.
- API style compatible with CommunityToolkit controls.
Build Steps
- Requires Visual Studio 2022 or later for compilation.
- To build
XamlToolkit.Labs.WinUI, you need to install tree-sitter via vcpkg:
vcpkg install tree-sitter:x64-windows-static
Markdown parsing uses md4c (https://github.com/mity/md4c).
Since vcpkg does not support configuring UTF-16 character set for md4c, the project directly includes the md4c source code.
Usage
NuGet
Add nuget packages to your project.
Add an XML namespace like this in your XAML
xmlns:ui="using:XamlToolkit.WinUI"
xmlns:controls="using:XamlToolkit.WinUI.Controls"
xmlns:convertors="using:XamlToolkit.WinUI.Convertors"
xmlns:labs="using:XamlToolkit.Labs.WinUI"
xmlns:media="using:XamlToolkit.WinUI.Media"

Related Skills
node-connect
349.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.7kCreate 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.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.7kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
