c# - UWP AppBar 颜色 c#

标签 c# xaml uwp win-universal-app

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

谢谢你的时间

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

Fitbit example

最佳答案

来自 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;
    }
}

关于c# - UWP AppBar 颜色 c#,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40327650/

相关文章:

c# - 在 Settings.settings 中更改设置的数据类型

c# - 以编程方式翻转 Metro FlipView

UWP BluetoothLEAdvertisementWatcherTrigger 未使用服务 uuid 筛选器触发

c# - 有没有办法在 UWP 中组合文件夹选择器和文件选择器?

c# - 使用c#删除字符串中[]括号之间的逗号

c# - .NET 核心 Web API key

c# - 我可以使用 LINQ 获取某种类型的所有组件吗?

c# - 如何让两个按钮与通用 Windows 平台共享一半的应用程序屏幕宽度

c# - WinRT平台是否可以根据目标类型获取资源

xaml - 垂直居中文本(TextBlock)