Today only XAML apps can extend their content to the title bar and apps that don't use XAML can't.
Extend title bar requires a XAML content to be displayed and Window.Current.SetTitleBar is a XAML API. However please provide a lower-level API in CoreWindow for doing the same in non-XAML apps. Maybe it could accept a Windows.Foundation.Rect and set that as the drag region.
| Capability | Priority |
| :---------- | :------- |
| This proposal will allow developers to extend the title bar in non-XAML apps eg: DirectX games | Must |
CoreWindow is a UWP only construct. WinUI 3 introduces the Window, and this supports extending into the titlebar area.
Not sure if this can be made to work with GDI apps, which can override the drawing of the titlebar already (though not easily) and WPF which can custom draw it's windows (not as simply as WinUI)
CoreWindow is a UWP only construct. WinUI 3 introduces the Window, and this supports extending into the titlebar area.
Not sure if this can be made to work with GDI apps, which can override the drawing of the titlebar already (though not easily) and WPF which can custom draw it's windows (not as simply as WinUI)
True but I'm taking about UWP apps not using XAML at all. Eg: DirectX games that render the screen on their own without using any XAML stuff.
CoreWindow is a UWP only construct. WinUI 3 introduces the Window, and this supports extending into the titlebar area.
Not sure if this can be made to work with GDI apps, which can override the drawing of the titlebar already (though not easily) and WPF which can custom draw it's windows (not as simply as WinUI)True but I'm taking about UWP apps not using XAML at all. Eg: DirectX games that render the screen on their own without using any XAML stuff.
Windows Runtime includes WinUI 3 desktop I guess now.
@mdtauk However there are also non-WinUI 3 or OS XAML apps using low level graphics and they aren't able to extend title bar under CoreWindow
I did not know that. I know there is a different behaviour with Full Screen apps, as well as no titlebars on Xbox
From the docs:
Simple color customization is available to Windows apps using XAML, DirectX, and HTML. Full customization is available only to Windows apps using XAML.
@rkarman can you look at this?
Somehow missed this assignment... Sorry about that.
This is a duplicate of, or at least related to issue #49 , since bringing that API to Reunion would be framework agnostic and thus work for windows with any type of content in them.
Assigning to @mevey who is working on the Titlebar feature area.
Today only XAML apps can extend their content to the title bar and apps that don't use XAML can't.
Win32, Winforms, WPF, etc can handle WM_NCCALCSIZE to remove the standard window frame then use DwmExtendFrameIntoClientArea to extend the window frame into the client area, allowing you to draw on it. This is basically what ApplicationFrameHost.exe does. (Although I'm not sure why it still extends the frame using DwmExtendFrameIntoClientArea, as it will be covered by the UWP drawn content anyways...)
Today only XAML apps can extend their content to the title bar and apps that don't use XAML can't.
Win32, Winforms, WPF, etc can handle
WM_NCCALCSIZEto remove the standard window frame then useDwmExtendFrameIntoClientAreato extend the window frame into the client area, allowing you to draw on it. This is basically whatApplicationFrameHost.exedoes. (Although I'm not sure why it still extends the frame usingDwmExtendFrameIntoClientArea, as it will be covered by the UWP drawn content anyways...)
You don't get it. I'm not taking about desktop Win32 apps. I'm taking about UWP apps that don't use the XAML framework for rendering (eg: DirectX, HTML, custom UI with composition). UWP XAML != UWP. The official API for UWP apps for extending the title bar only works with the XAML framework as it expects a UI element to be the drag region.
We are working on a proposal and roadmap to enable non-XAML apps to customize the titlebar area. We will share this with you in the coming weeks for feedback.