【问题标题】:UWP - Change back button color without changing minimize/close button colorsUWP - 更改后退按钮颜色而不更改最小化/关闭按钮颜色
【发布时间】: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


    【解决方案1】:

    不幸的是,这是不可能的。但是,您可以将应用的内容扩展到标题栏,然后创建自己的后退按钮。看看here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多