【发布时间】:2018-01-11 00:25:51
【问题描述】:
使用 Live Property Explorer,我可以看到 HamburgerMenu 控件的背景颜色是 DimGray 或 #FF2B2B2B,具体取决于 Light/Dark 主题选择,但是这些颜色从哪里继承它们的值?
我想为 PageHeader 背景颜色而不是 CustomColor(模板中默认为 SteelBlue)使用相同的颜色。
在 Custom.xaml 资源字典中,如果我在“Light”资源字典中注释掉针对 PageHeader 控件的样式,该样式几乎对标题的右侧部分产生了我想要的效果,但对 Hamburger 标题却没有。
<!--<Style TargetType="controls:PageHeader">
<Setter Property="Background" Value="{ThemeResource CustomColorBrush}" />
<Setter Property="Foreground" Value="{ThemeResource ContrastColorBrush}" />
</Style>-->
【问题讨论】:
-
您需要发布一些代码并提供更多背景信息,以便我们帮助您解决此问题。
-
我自己还没有玩过template10,但是看看使用的控件,似乎使用了样式属性NavAreaBackground...github.com/Windows-XAML/Template10/blob/master/Controls/…github.com/Windows-XAML/Template10/…
标签: uwp template10