【问题标题】:UWP AppBar color c#UWP AppBar 颜色 c#
【发布时间】:2016-10-30 09:28:33
【问题描述】:

我正在尝试设计 Windows 通用应用程序(Windows 10),为了让一切看起来正确,我希望更改应用程序边框颜色。我之前检查过论坛,但似乎没有一个解决方案是正确的。

感谢您的所有时间

这是我找到的一个示例,即使我的系统颜色为深灰色,仍是薄荷色。

【问题讨论】:

    标签: c# xaml uwp win-universal-app


    【解决方案1】:

    来自UWP Windows 10 App, TitleBar and Status bar customization

    if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.ApplicationView"))
    {
        var titleBar = ApplicationView.GetForCurrentView().TitleBar;
        if (titleBar != null)
        {
            titleBar.ButtonBackgroundColor = Colors.DarkBlue;
            titleBar.ButtonForegroundColor = Colors.White;
            titleBar.BackgroundColor = Colors.Blue;
            titleBar.ForegroundColor = Colors.White;
        }
    }
    

    【讨论】:

    • 我看到很少有与您的解决方案很相似的解决方案,但这是唯一真正有效的解决方案。非常感谢
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-11-10
    • 2021-11-05
    • 2021-01-10
    • 1970-01-01
    • 2018-03-20
    • 2022-01-23
    • 1970-01-01
    相关资源
    最近更新 更多