【发布时间】:2018-01-12 03:10:38
【问题描述】:
我正在尝试更改我的应用程序中标题栏按钮的背景颜色(后退按钮和最小化/展开/关闭按钮)。具体来说,我希望后退按钮的颜色与最小化/展开/关闭按钮不同。此代码更改后退按钮和最小化/展开/关闭按钮的颜色;如何分别更改颜色?
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;
}
【问题讨论】:
标签: c# windows colors uwp titlebar