Refs #19352.
This PR adds an experimental wxWinUI toolkit backend based on WinUI 3 and the Windows App SDK.
It preserves the standard wxWidgets API and HWND-based window hierarchy. The port defines both __WXWINUI__ and __WXMSW__: it is an overlay on wxMSW with a different control-rendering backend, not a replacement for the existing wxMSW port.
The initial prototype used one DesktopWindowXamlSource per control. This implementation instead uses one shared XAML island per top-level window. WinUI-backed controls register slots in this shared host, which manages layout, clipping, Z-order, input routing and lifetime.
This considerably reduces island overhead and allows WinUI-backed controls, generic wx controls and native HWND children to coexist in the same top-level window.
This PR is intentionally submitted as an experimental Draft/RFC. It does not claim full wxMSW parity or production readiness.
-DwxBUILD_TOOLKIT=winui.__WXWINUI__ and __WXMSW__ available.resources.pri.The port implements or integrates a broad set of controls, including:
wxInfoBar;wxTreeCtrl;The standard toolkit-neutral public class names remain unchanged, allowing existing samples such as minimal, widgets and showcase to build without source changes.
winuispike diagnostic and latency harness.minimal, widgets, showcase, dataview and dialog coverage.Current Supported V0 requirements:
cmake -S . -B build-winui ^ -G "Visual Studio 17 2022" -A x64 ^ -DwxBUILD_TOOLKIT=winui ^ -DwxBUILD_SAMPLES=SOME ^ -DwxBUILD_TESTS=ALL cmake --build build-winui --config Release
The samples and wxWidgets DLLs are produced under:
build-winui\lib\vc_x64_dll
The runtime deployment probe can be built and executed with:
cmake --build build-winui --config Release ^
--target wx_winui_runtime_smoke
build-winui\winui\runtime-smoke\wx_winui_runtime_smoke.exeThe Supported V0 automated gate is:
ctest --test-dir build-winui -C Release ^ -R "^wx_winui_supported_beta$" ^ --output-on-failure
The current narrow Windows 11 x64/MSVC/Release profile has been validated with:
wxcore, test_gui, minimal, widgets, showcase and diagnostic targets;WinUI-backed controls, generic wx controls and native HWND children can coexist in the same top-level window because they all retain real HWND entries in the normal wx parent/child hierarchy.
However, selection of the implementation for a standard control class is currently made at toolkit build time. This PR does not yet expose parallel public class families such as wxWinUI::Button and wxMSW::Button in the same translation unit.
This differs from the namespace-based approach previously suggested in #19352. Feedback is welcome on whether per-control implementation selection should be:
The currently demonstrated profile is deliberately narrow:
wxUSE_UNICODE_UTF8=OFF.The following remain experimental or unqualified:
The shared-island architecture also cannot directly represent an alternating XAML > HWND > XAML nesting topology. Components requiring this structure remain outside the Supported V0 profile.
This is a large foundational change. I am willing to split it into reviewable PRs if preferred, for example:
The immediate goal is to obtain feedback on the architecture and establish an experimental wxWinUI backend that can evolve incrementally without replacing or destabilizing wxMSW.
The authoritative per-component status is documented in
plans/winui3-v0/component-matrix.md.
A component being buildable does not imply that it has a native WinUI backend
or belongs to the Supported V0 profile.
| Area | Components |
|---|---|
| Native window topology | wxNativeWindow, MDI |
| Advanced books | wxAuiNotebook |
| Wizards and properties | wxWizard, property sheets and preferences |
| Filesystem controls | wxGenericDirCtrl, wxFileCtrl, filesystem composites |
| Data/property controls | wxPropertyGrid, related property-grid components |
| Advanced UI libraries | AUI, Ribbon, RichText, STC and HTML |
| Native/COM surfaces | WebView, Media, GLCanvas and ActiveX |
| Shell integration | taskbar controls, notifications, splash screen and tip window |
| Composite controls | wxCollapsiblePane |
| Deployment profiles | self-contained Windows App SDK deployment |
Any public wxWidgets class absent from the component matrix must currently be
considered excluded from Supported V0.
These components can participate in a wxWinUI build, but do not currently use
a dedicated WinUI peer:
wxPanel;wxPopupWindow, transient windows and wxMiniFrame;wxScrolledWindow, canvas and splitter/sash windows;wxListCtrl and virtual list controls;wxDataViewCtrl, DataView lists/trees and wxTreeListCtrl;wxGrid, wxVListBox and wxHtmlListBox;wxComboCtrl, owner-drawn combos, rearrange and editable lists;wxBannerWindow and wxAnimationCtrl;These fallback paths remain outside the native WinUI support promise until
their physical input, rendering, accessibility and lifetime contracts are
qualified.
The following have WinUI implementations but are not yet fully qualified:
wxFrame, wxDialog and the shared host infrastructure;wxToolbook;ContentDialog presentation;Their deterministic tests may pass, but physical input, UIA, DPI, theme,
High Contrast, RTL and multi-window qualification remain separate gates.
The current narrow Supported V0 inventory includes:
wxInfoBar;wxNotebook;wxSimplebook;wxChoicebook, wxListbook and wxTreebook;wxTreeCtrl;wxMessageDialog;Support is limited to the published Windows 11 x64, MSVC, Release,
framework-dependent unpackaged profile.
wxTextCtrl does not provide full wxTE_RICH/wxTE_RICH2 formatting;SetStyle() and GetStyle() are not implemented.wxComboBox does not provide a distinct wxCB_SIMPLE presentation.wxListBox and wxCheckListBox do not support wxLB_OWNERDRAW or thewxSlider does not implement tick placement, range labels or custom thumbwxDatePickerCtrl represents wxDP_SPIN using the dropdown picker.wxCalendarCtrl does not expose week numbers or wxCAL_HITTEST_WEEK.wxNB_TOP belongs to the supported notebook profile.wxTreeCtrl does not implement wxTR_LINES_AT_ROOT, wxTR_ROW_LINES,wxTR_FULL_ROW_HIGHLIGHT or wxTR_TWIST_BUTTONS.wxColourDialog custom palettes and ChooseFull semantics are nothttps://github.com/wxWidgets/wxWidgets/pull/26890
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Thanks, I didn't have time to look at this at all yet, but it would be good to
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Hey !
Np i'll do that !
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@Fefedu973 pushed 2 commits.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Kicad fluent UI (experimental). I managed to build a part of kicad with the new winui port, there are a lot of issues but it is promissing
Image: image (view on web)
Image: image (view on web)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Please do not take the following as a critique, just as few observations of a curious person.
As a simple old man, I cannot fathom that an LLM could successfully undertake a complex task such as porting a wxWidgets GUI toolkit, at least making it compilable (let alone making consistently good large- and small-scale decisions). Being very curious, I decided to try this port (since I am not using Linux, no GTK 4 for me). I have no experience with WinUI 3, except checking out the WinUI 3 Gallery application.
Firstly, it does not compile with MSVS 2026 due to many static asserts failing for using a deprecated feature. But it told me what to do, so I added -DCMAKE_CXX_FLAGS="/D_SILENCE_EXPERIMENTAL_COROUTINE_DEPRECATION_WARNINGS" to the CMake build parameters. After that, the build succeeded, although with many warnings.
Then I ran the minimal.exe. It showed and it looked as expected which I found incredible. I then clicked Help/About in the menu. The About dialog appeared. I have noticed, that unlike with Win32, the dialog added a taskbar item for itself. More importantly, when I moved the mouse cursor out of the dialog, the cursor changed to wait and when moving it back inside the dialog, the application silently exited. Both happen also with the wxWidgets info box (Ctrl+Alt+MiddleClick into the frame empty area).
I launched the dataview sample, the contents of the control is empty on all the tabs, only the selection rect being somewhat visible. Oops. But, when trying the dark mode, the content is there and it seems to mostly work, so it is probably just wrong colors being used in the light mode...
I then played with the widgets sample. Of course, there were countless issues (including radiobox asserts when starting it) but some controls seemed to work, at least at the first glance. The mouse-related modal dialog issue described for the minimal sample manifests there as well (e.g., with the font picker dialog).
I did not even try to look at the source code (yet), being unfamiliar with WinUI 3.
Not sure if the way it was done is feasible (read: can work and is maintanable) but if the maintainers decide to go ahead; I probably cannot help with coding, but perhaps I could help with testing.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
I fully understand, and I don't hide the fact that I relied heavily on LLMs for this work. The task was simply too large and complex for me to undertake entirely on my own.
That said, it still took me more than a month of very intensive work, several hundred dollars in inference costs, and a lot of manual testing, debugging, reviewing and iteration.
I don't claim that this PR is production-ready, or even beta-quality at this point. There are obviously many issues left to find and fix, and I fully expected that. My hope is mainly that it can provide a useful starting point for further work rather than being treated as a finished implementation.
Without the help of LLMs, I personally would never have been able to attempt something of this scale, and I suspect a WinUI 3 port might otherwise not have been explored for quite some time.
So feedback like this is actually very valuable. If the maintainers decide that this direction is worth pursuing, additional testing would definitely be helpful.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
I fully understand, and I don't hide the fact that I relied heavily on LLMs for this work. The task was simply too large and complex for me to undertake entirely on my own. That said, it still took me more than a month of very intensive work, several hundred dollars in inference costs, and a lot of manual testing, debugging, reviewing and iteration.
I see, I thought you just told the LLM "make the port", perhaps with few pokes, and that was basically it. I have no experience with using an LLM for such huge tasks so please excuse my ignorance.
I think the modal dialog issue is worth looking into: I could reproduce it with every dialog in every sample I tried. Is this different in KiCad?
If it was not clear from my previous post: I do appreciate the effort, time, and money invested into this enormous task. Thanks again!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Don't underestimate today's LLMs: They have neither eyes nor mouse so they can test only theoretically. But as they can write extensive tests (and normally will do so) the error ratemight be surprisingly low. Also the remaining bugs tend to be so obvious for human testers that it is easy to find those few bugs=> the first experiment dlcannir hit the spot without testing. But it typically is nearer to rock solid than work a real human does.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@PBfordev No problem ^^
I fully understand that a 300 000 + lines PR with all of this ai slop nowdays raises some concerns, this is 100% valid.
I'll take a look at your issue as soon as i can
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Kicad fluent ui edition ! (it is almost working)
https://github.com/user-attachments/assets/fc31f5f6-1185-49aa-a486-028c0427ee0d
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@Fefedu973 pushed 1 commit.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@Fefedu973 pushed 1 commit.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
After the two recent commits, I can no longer reproduce the crash after mouse cursor leaving a modal dialog. Great!
Just two suggestions for perhaps low-hanging fruit that could improve a lot of code:
wxSystemSettings::GetColour()?): This would make custom-drawn generic controls like wxDataViewCtrl, wxGrid, wxPropGrid etc. appear properly and improve appearance in some other samples.wxTextCtrl seems to be calculated incorrectly, being too low. This results in basically every single line control having a vertical scrollbar (and the text being partially cut off).BTW, I have also noticed that just launching the minimal sample and immediately closing it, shows many memory leaks in the MSVS debug output.
There are also several compiler warnings such as parameter mismatch (double vs int) for printf() but I guess these are not important now...
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@Fefedu973 pushed 2 commits.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@Fefedu973 pushed 1 commit.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@Fefedu973 pushed 2 commits.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@Fefedu973 I've asked for this for another big (but not as big as this one!) LLM-generated PR and I think it might be a good idea here too: could you please ask your tool to break this huge PR in a number of humanly reviewable (much) smaller PRs? I think it should be able to do it and this would provide some way to proceed because right now I simply have no idea how to even start looking at this.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Hey !
No problem this is exactly what I'm currently doing Right now actually 😅
It will be a long task but my goal is to provide the best version possible for the community!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@Fefedu973 pushed 15 commits.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@Fefedu973 pushed 3 commits.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Just for the record, the stack overflow crash caused by moving the mouse cursor out of any dialog is back, although now it crashes in other places.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@Fefedu973 pushed 6 commits.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@Fefedu973 pushed 1 commit.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Just for the record, the stack overflow crash caused by moving the mouse cursor out of any dialog is back, although now it crashes in other places.
Noted. Thanks ! 👌
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@Fefedu973 pushed 8 commits.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@Fefedu973 pushed 6 commits.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@Fefedu973 pushed 3 commits.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@Fefedu973 pushed 3 commits.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@Fefedu973 pushed 1 commit.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@Fefedu973 pushed 4 commits.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@Fefedu973 pushed 6 commits.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()