The ApplicationViewTitleBar and CoreApplicationViewTitleBar
have amazing features to personalizing the title bar (see title bar customization documentation. We can easily change the colors of the title bar or put a control in the title bar. These features are absent from Win32 (or less affluent) they are also unavailable in WinUI 3 Desktop Desktop.
@mveril The WinUI team is aware of this and while functionality like Window.SetTitleBar() won't make it into WinUI 3.0 (for Desktop) I believe this on the todo-list for subsequent WinUI releases (3.x/4....).
If Core Application's title bar can't be opened for Win32 apps, then all the same functionality should be wrapped into a clean API that removes the need to drive into the HWND
@mdtauk I agree with this. Why should a non-contained app not be able treat it's Titlebar just the way a UWP app can - it is a completely arbitrary limitation. It only makes sense in a world where Win32 is being left behind, but since it's not, Win32 has to be updated to look like UWP.
I imagine UWP has a very specific and locked down implementation of a HWND interface, but part off Win32's flexibility is being able to fully control that.
I would like to see an option on the new Window Xaml element, that allows you to pick a window style, one of those being a modern or Fluent style window
Terminal app is using a normal HWND window to extend Xaml elements on to it. Granted it's a bit hacky how they have 2 xaml islands, but there's an example of how to do it.
You can already paint into the titlebar area of a normal Window, just do a google search and every possible language has examples in stack overflow.
@eklipse2k8 True, but ever since Windows 10 introduced the transparent non client area that allows Windows to appear borderless (compared to Windows 8 or 7), there's a lot more work than a simple call to AdjustWindowRectEx and using it's returned values in DwmExtendFrameIntoClientArea to draw onto a title bar.
Personally, I think that this is the right solution, however, there will always be developers who cut corners. I believe that adding a simply set of classes/interface to do all that for you would be nice.
I'm gonna develop custom title-bar tools for Win32 developers :)
@rkarman - this ask lines up nicely with some windowing proposals you're looking at.
Most helpful comment
If Core Application's title bar can't be opened for Win32 apps, then all the same functionality should be wrapped into a clean API that removes the need to drive into the HWND