Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

387 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 NuGet
XamlToolkit.WinUI.Helpers.Native NuGet
XamlToolkit.WinUI.Converters.Native NuGet
XamlToolkit.WinUI.Media.Native NuGet
XamlToolkit.WinUI.Controls.Native NuGet
XamlToolkit.WinUI.Animations.Native NuGet
XamlToolkit.WinUI.Behaviors.Native NuGet
XamlToolkit.WinUI.Interactivity.Native NuGet
XamlToolkit.Labs.WinUI.Native NuGet
XamlToolkit.WinUI.Rive.Native NuGet
XamlToolkit.WinUI.Terminal NuGet

Note: When using the C# version, make sure to set the <TargetFramework> to:

<TargetFramework>net8.0-windows10.0.26100.0</TargetFramework>

Controls

RivePlayer

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

Adorners

ColorAnalyzer

ColorAnalyzer

DataTable

DataTable

MarkdownTextBlock

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

MarkdownTextBlock

Marquee

Marquee

OpacityMaskView

OpacityMaskView

Ribbon

Ribbon

Shimmer

Shimmer

TokenView

TokenView

ColorPicker / ColorPickerButton

ColorPicker

DockPanel

DockPanel

ImageCropper

ImageCropper

LayoutTransformControl

LayoutTransformControl

MetadataControl

MetadataControl

HeaderedContentControl / HeaderedItemsControl / HeaderedTreeView

HeaderedContentControl

ConstrainedBox

ConstrainedBox

RadialGauge

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

RadialGauge

RangeSelector

RangeSelector

GradientSlider

GradientSlider

RichSuggestBox

RichSuggestBox

Segmented

Segmented

SettingsCard / SettingsExpander

SettingsCard

ContentSizer / GridSplitter / PropertySizer

GridSplitter

StaggeredLayout / StaggeredPanel

StaggeredLayout

SwitchPresenter

SwitchPresenter

TabbedCommandBar

TabbedCommandBar

TokenizingTextBox

TokenizingTextBox

UniformGrid

UniformGrid

WrapPanel / WrapPanel2

WrapPanel

AttachedDropShadow / AttachedCardShadow

AttachedCardShadow

XamlCompositionEffectBrush

TilesBrush

TransitionHelper

TransitionHelper

Windows Terminal Control

Terminal

Terminal Control support is available via XamlToolkit.WinUI.Terminal

Windows Store NavigationView Style

StoreNavigationViewStyle

Add the following resource dictionary to your application's resources:

  <ResourceDictionary Source="ms-appx:///XamlToolkit.Labs.WinUI/Styles/StoreNavigationViewStyle.xaml" />

XamlToolkit.WinUI.Animations

ImplicitAnimations / ExplicitAnimations / ShadowAnimations

Animations

EffectAnimations (XamlToolkit.WinUI.Media.Animations)

EffectAnimations


XamlToolkit.WinUI.Interactivity

A C++/WinRT port of XamlBehaviors, providing a lightweight behavior and trigger system for WinUI 3 applications.

This module ports the original C# WinUI XamlBehaviors implementation to C++/WinRT, while keeping full API compatibility for seamless migration.

Notes

  • ChangePropertyAction and CallMethodAction are not implemented (due to lack of reflection support in C++/WinRT); instead, property mutation is split into:

    • ChangeCustomPropertyAction
    • ChangeDependencyPropertyAction
  • DataTriggerBehavior may not work with certain types.

  • EventTriggerBehavior includes default event mappings; missing events must be manually registered via EventManager.


XamlToolkit.WinUI.Behaviors

Behaviors


Features

  • Native C++/WinRT implementation for WinUI 3.
  • API style compatible with CommunityToolkit controls.

Build Steps

  • Requires Visual Studio 2026 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"

Sample

Releases

Packages

Contributors

Languages