[英]UWP - Change back button color without changing minimize/close button colors
I am trying to change the background colors of the Title Bar buttons in my app (the Back button and the minimize/expand/close buttons). 我正在尝试更改应用程序中标题栏按钮的背景颜色(“后退”按钮和最小化/展开/关闭按钮)。 Specifically, I want the back button color to be difference from the minimize/expand/close buttons. 具体来说,我希望后退按钮颜色与最小化/扩展/关闭按钮不同。 This code changes both the back button and minimize/expand/close buttons color; 此代码更改后退按钮和最小化/扩展/关闭按钮颜色; How can I change the colors separately from eachother? 如何单独更改颜色?
var titleBar = ApplicationView.GetForCurrentView().TitleBar;
if (titleBar != null)
{
// I only want to change the back button color here, but this code
// changes both the back button and resize/close buttons color too
titleBar.ButtonBackgroundColor = Windows.UI.Colors.DarkBlue;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.