Change window border color in my UWP application in WinJS

How to change the border color of my application window?

For example, in the Microsoft One Note 2013 application, purple is also located on the panel at the top, as well as above the minimize, maximize, and close buttons.

I am using visual studio 2015.

I looked through the application manifest and cannot find anything

+4
source share
1 answer

You can set the color of the application title bar using the ApplicationViewTitleBar class :

var appView = Windows.UI.ViewManagement.ApplicationView.getForCurrentView();
appView.titleBar.backgroundColor = Windows.UI.Colors.black; // or {a: 255, r: 0, g: 0, b: 0}
appView.titleBar.inactiveBackgroundColor = Windows.UI.Colors.black;
appView.titleBar.buttonBackgroundColor = Windows.UI.Colors.black;
appView.titleBar.buttonHoverBackgroundColor = Windows.UI.Colors.black;
appView.titleBar.buttonPressedBackgroundColor = Windows.UI.Colors.black;
appView.titleBar.buttonInactiveBackgroundColor = Windows.UI.Colors.black;
+6
source

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


All Articles