How to create a WinUI3 application that has no title bar and no minimize, maximize, and close buttons? #8800
-
Hi there, I am creating a WinUI3 desktop application that has its own custom close action button in the center of the Mainwindow. Additionally, I want to remove the entire title bar along with the minimize [-], maximize [ ], and close [X] controls. I use the ExtendViewIntoTitleBar but that does not remove the window control buttons. And that keeps it window border-radius and shadow. Furthermore, I do not want the application to appear in the Windows taskbar as an extra application. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
You can use a Layered window (like WinUI3_SwapChainPanel_Layered) |
Beta Was this translation helpful? Give feedback.
It is C++, but it is possible to use this same functionality from C#. WinUI is based upon the same set of underlying components, so most of that should work as is. The biggest issue is with the call to DwmSetWindowAttribute, since that would have to be a platform invoke call.
This would mean that it is pretty trivial to convert between the two when working with the WinUI code, and WinRT component code in general.