Replies: 1 comment 2 replies
-
First of all, this isn't true. Simple customisation isn't supported on Windows 10, but there are multiple ways to do this without using Xaml. The big thing to remember is that the custom titlebar functionality in AppWindow is just an implementation of the DWM method. This means that any method of drawing to the top of the window will work.
There is a reason why the example is set up to use the Xaml compiler. It is possible to implement things without using the Xaml compiler, but it isn't the nicest thing to do. The ability to create WinRT components is required for full Xaml functionality. |
Beta Was this translation helpful? Give feedback.
-
Greetings!
I'm working on a massive UI refactoring on a Python application, and one issue that needs tackling is the Windows title bar.
For the app's dark theme, calling the DWM Win32 API would suffice, but it also has a transparent theme - the current implementation disables the window decoration and renders its own title bar from scratch, which requires manually handling basic stuff like dragging and caption buttons, and demands gnarly workarounds for things like minimizing to tray.
The Windows App SDK should be the way to go for this - meaning PyWinRT to the rescue! - but as mentioned there it requires making a custom XAML component to have transparency... or changing colors at all on Windows 10, for that matter. XAML Islands are an obvious solution, yet I faced the same issues as #2233 with the available resources mixing up UWP and WASDK and centering on plain C++ Win32 apps.
Given the circumstances, is it viable to create and attach an island through bindings such as PyWinRT?
Beta Was this translation helpful? Give feedback.
All reactions