windows-runtime - 设置 Windows Phone 8.1/WinRT AppBarButton 样式

标签 windows-runtime windows-phone-8.1 winrt-xaml windows-8.1

我目前正在寻求为 WinRT Windows Phone 8.1 应用程序实现 CommandBar。总的来说,它非常简单,但我无法设置控件的样式。

我已经对我的应用程序进行了主题化,以便强调色已更改为绿色。这对于应用程序中的几乎所有地方(按钮、文本 block 等)都适用,但不适用于 AppBarButton。

我要覆盖的画笔是 SystemColorControlAccentBrush 和 PhoneAccentBrush,但更改这些画笔不会对按下时 AppBarButton 的颜色产生任何影响: AppBarButtonPressed

知道我做错了什么/这个颜色可以改变吗?

最佳答案

设置CommandBar的前景色和背景色。

Windows Phone 上的命令栏是系统 UI,而不是应用程序 UI,并且不允许自定义单个 AppBarButton 的颜色。它们的颜色始终来自 CommandBar 的颜色。

关于windows-runtime - 设置 Windows Phone 8.1/WinRT AppBarButton 样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30218464/

相关文章:

windows-8 - 从使用 WinJS 读取的文件返回值以在页面中使用

c# - 使用 DataContractSerializer 和 DataProtectionProvider 序列化和加密对象

c# - 适用于 WinRT 的 AppBarButtonSyle

c# - 保存和加载通用数据 WinPhone8.1 C#

c# - Windows Phone 8.1 VibrationDevice 不会停止振动

windows-runtime - Win10 平板模式下的 WebAuthenticationBroker

youtube - 在Windows Phone 8.1上播放Youtube视频

c++ - C++ 中的 VisualState 示例?

c# - 单击 ContentControl 不会为其提供焦点

c# - 具有相同 xaml 文件和不同 DataContext 的多个输入表单