How to hide / collapse the title bar in a UWP application?

Is there a way to hide / collapse / make the header in the UWP app temporarily invisible (but not completely disable)?

I know that you can make a full-screen mode of the application, after which the title bar is automatically minimized, but I need to implement it in a resizable window. I also know that you can customize the appearance of the header, such as color, etc.

Reason: I have an application with a lot of windows and I need to save screen space and have more space for the client area of ​​windows.

I read various sources, but did not find the answer:

For example, it seems that the solution for the same problem for WPF is: How to remove the title bar from the window, but keep the border

+4
source share
1 answer

Finally, I have to say that in order to have additional screen real estate (which I need), you can expand the client area to the title and make the background color of 3 buttons (minimize, maximize, close) transparent:

With a standard header:

enter image description here

With an expanded viewing background and transparent buttons:

ApplicationViewTitleBar formattableTitleBar = ApplicationView.GetForCurrentView().TitleBar;
formattableTitleBar.ButtonBackgroundColor = Colors.Transparent;
CoreApplicationViewTitleBar coreTitleBar = CoreApplication.GetCurrentView().TitleBar;
coreTitleBar.ExtendViewIntoTitleBar = true;

enter image description here

+17
source

Source: https://habr.com/ru/post/1613867/


All Articles