The OS should provide a safe API for how to draw native widgets and how they behave. Then you can draw your own anywhere.
I didn’t think Weyland had its own toolkit?
And can you run for example Weyland on Windows?
Also, the problem, I guess, is not just drawing (which could be done securely in a frame-buffer), but that you have to receive the events.
I guess uxtheme is unsuitable for win32k lockdown for some reason, probably because it's GDI-based.
[1]: https://devblogs.microsoft.com/oldnewthing/20050211-00/?p=36...
You’re right, uxtheme can’t be called directly from content because of win32k dependencies. One option could be for content to request the parent to draw those controls, but as you can imagine there are drawbacks to doing that. As usual, there are a lot of trade offs involved.