SkillAgentSearch skills...

WinUIEssentials

C++ programmer is not part of windows community therefore cannot use the windows community toolkit. So I made one for C++. QQ讨论群:479734355

Install / Use

/learn @HO-COOH/WinUIEssentials
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

WinUI Essentials

A repo dedicated for simplifying C++ development with WinUI2 (Universal Windows Platform) and WinUI3 (Windows App SDK).

Nuget

For UWP:

For WinUI3 (Windows App SDK):

Example Gallery

Download from Microsoft Store!

<a href="https://apps.microsoft.com/detail/9pcc690bcmt9?referrer=appbadge&mode=direct"> <img src="https://get.microsoft.com/images/en-us%20dark.svg" width="200"/> </a>

Example project build status:

|Platform|Debug|Release| |---|---|---| |x86| Build Debug x86 | Build Release x86 |x64| Build Debug x64 | Build Release x64 |~~ARM~~| ~~Build Debug ARM~~ | ~~Build Release ARM~~ |ARM64| Build Debug ARM64 | Build Release ARM64

Usage

[!NOTE] Update since WinEssential.WinUI3 1.5, you do NOT need to add control resources in Application.Resources!

[!WARNING] Make sure to set your C++ language version to C++20 first!

Open the WinUIEssential.sln containing 4 projects:

  • UWPPackage (project for WinUIEssential.UWP nuget package)
  • UWPExample (example gallery for using the above package)
  • WinUI3Package (project for WinUIEssential.WinUI3 nuget package)
  • WinUI3Example (example gallery for using the above package)

Build the *Package project will build the project and pack it with nuget, then install the nuget to your project and start using it.

To build the *Example project, do the same thing. They did not reference *Package for demo purposes.

[!NOTE] Functionalities for UWP and WinUI3 should be exactly the same unless otherwise noted!

It should be useful until the community toolkit provides C++.


Build and contribute

Build requirements

  • You need to have vcpkg installed and integrate setup for msbuild. See this documentation for guide.
  • You need to have Visual Studio 2026 with Desktop development with C++ and WinUI Application development workload installed. (2022 will NOT work, as we are using the v145 C++ tools)
  • You need to build both Debug and Release build to successfully build and debug the example project (this is intentional for not missing debug version of the package)
  • = Windows 10 17763 (Actually I mostly use Windows 10 17763 to ensure compatibility that WinUI3 claims to support)

You can reference Github Action for detailed build steps.

Contribute a new templated control

  1. DO NOT submit a PR that's purely AI written WITHOUT your reviewing. I will NOT review it.
  2. Create a control under the Controls folder, with the ViewModel file template, then you edit the idl as needed
  3. If the control has a ResourceDictionary xaml, add an entry in the WinUIEssential.WinU3.targets so that the .xbf file is properly copied (see that file for example)
  4. Please also consider adding a demo page for the control, and add it to MainWindow.xaml.h MainWindow::s_page (see the file for example)

Content

|Component|UWP|WinUI3|Type |--|--|--|--| |WinUIIncludes| :white_check_mark: | :x: | Header only |TemplateControlHelper| :white_check_mark: | :white_check_mark: | Header only |Glyphs| :white_check_mark: | :white_check_mark: | Header only + Xaml only |BadgeGlyphs| :white_check_mark: | :white_check_mark: | Header only |ToastTemplates| :white_check_mark: | :white_check_mark: | Header only |ToastBuilder | :white_check_mark: | :white_check_mark: | Header only |TileTemplates| :white_check_mark: | :white_check_mark: | Header only |TileBuilder | :white_check_mark: | :white_check_mark: | Header only |CursorController | :white_check_mark: | :white_check_mark: | WinRT component |PropertyChangeHelper | :white_check_mark: | :white_check_mark: | Header only |NegateBoolConverter | :white_check_mark: | :white_check_mark: | WinRT component |BoolToVisibilityConverter | :white_check_mark: | :white_check_mark: | WinRT component |ContainerToBoolConverter | :white_check_mark: | :white_check_mark: | WinRT component |StringToBoolConverter | :white_check_mark: | :white_check_mark: | WinRT component |ReferenceToBoolConverter | :white_check_mark: | :white_check_mark: | WinRT component |ConverterGroup | :white_check_mark: | :white_check_mark: | WinRT component |Convert | :x: | :white_check_mark: | WinRT component |IsEqualStringTrigger| :white_check_mark: | :white_check_mark: | WinRT component |IsNullOrEmptyStateTrigger | :white_check_mark: | :white_check_mark: | WinRT component |ControlSizeTrigger | :white_check_mark: | :white_check_mark: | WinRT component |CharmBar | :white_check_mark: | :x: | WinRT component |GroupBox | :white_check_mark: | :white_check_mark: | Control |SettingsCard | :white_check_mark: | :white_check_mark:* | Control |SettingsExpander | :white_check_mark: | :white_check_mark:* | Control |FontIconExtension | :white_check_mark: | :white_check_mark: | WinRT component |DependentValue| :white_check_mark: | :white_check_mark: | WinRT component |Taskbar| :x: | :white_check_mark: | Header only |MarqueeText | :white_check_mark: | :white_check_mark: | Control |ProgressBarEx | :white_check_mark: | :white_check_mark: | Control |WindowEx | :x: | :white_check_mark: | Window |TransparentBackdrop | :x: | :white_check_mark: | SystemBackdrop |Segmented | :white_check_mark: | :white_check_mark: | Control |CustomMicaBackdrop | :x: | :white_check_mark: | Backdrop |CustomAcrylicBackdrop | :x: | :white_check_mark: | Backdrop |Shimmer | :white_check_mark: | :white_check_mark: | Control |ImageExtension | :white_check_mark: | :white_check_mark: | WinRT component |SwitchPresenter | :x: | * :white_check_mark: | Control |ModernStandardWindowContextMenu| :x: | * :white_check_mark: | WinRT component |WindowContextMenu | :x: | :white_check_mark: | WinRT component |NonResizableWindowWhiteBorderWorkaround | :x: | :white_check_mark: | WinRT component |ComboBoxHelper | :x: | :white_check_mark: | WinRT component |AutoSuggestBoxHelper | :x: | :white_check_mark: | WinRT component |WrapPanel | :x: | :white_check_mark: | Panel |ToolTipHelper | :x: | :white_check_mark: | WinRT component |CommandBarHelper | :x: | :white_check_mark: | WinRT component |IInitializeWithWindowHelper | :x: | :white_check_mark: | Header only |WindowCaptionButtonThemeWorkaround | :x: | :white_check_mark: | WinRT component |MicaBackdropWithFallback | :x: | :white_check_mark: | WinRT component |NonMaximizableWindowWorkaround | :x: | :white_check_mark: | WinRT component |DatePickerHelper | :x: | :white_check_mark: | WinRT component |TimePickerHelper | :x: | :white_check_mark: | WinRT component |FlyoutHelper | :x: | :white_check_mark: | WinRT component |CalendarDatePickerHelper | :x: | :white_check_mark: | WinRT component |ModalWindow | :x: | :white_check_mark: | WinRT component |NavigationViewHelper | :x: | :white_check_mark: | WinRT component |SliderHelper | :x: | :white_check_mark: | WinRT component |RevealFocusPanel | :x: | :white_check_mark: | Control |TenMica | :x: | :white_check_mark: | WinRT component

*means additional settings required, see the sections for info


WinUIIncludes

Include the WinUI2 headers in your pch.h, so you don't waste your time figuring out where the compilation error comming from./

Usage: Add this in your pch.h

#include <WinUIIncludes.hpp>

TemplateControlHelper

Automatically call DefaultStyleKey() for your templated control so you don't waste your time when you forget to include this line and get an empty control.

Usage: Inherit this class in your header file, make the template argument your implementation type.

#include <TemplateControlHelper.hpp>
...
struct MyControl : MyControlT<MyControl>, TemplateControlHelper<MyControl>
{
    ...
};

ToastHelper

Helper for creating toast notifications.

ToastTemplates --- namespace ToastTemplates

The built-in templates re-written to strongly-typed classes that derived from winrt::Windows::UI::Notification::ToastNotification, so that you can

View on GitHub
GitHub Stars41
CategoryDevelopment
Updated4h ago
Forks8

Languages

HTML

Security Score

95/100

Audited on Mar 22, 2026

No findings