我对template10自定义样式有一个奇怪的问题,这是一个simple gif to show you。正如您所看到的所有布局和背景自动更新,但NavButton和NavButtonChecked的前景不会自动执行,为什么? 这是我使用的代码:
<ResourceDictionary x:Key="Light">
<Style TargetType="controls:HamburgerMenu">
<Setter Property="HamburgerBackground" Value="{ThemeResource SystemChromeMediumColor}" />
<Setter Property="HamburgerForeground" Value="{ThemeResource SystemBaseHighColor}" />
<Setter Property="NavAreaBackground" Value="{ThemeResource SystemChromeMediumLowColor}" />
<Setter Property="NavButtonBackground" Value="Transparent" />
<Setter Property="NavButtonForeground" Value="{ThemeResource SystemBaseHighColor}" />
<Setter Property="NavButtonHoverBackground" Value="Transparent" />
<Setter Property="NavButtonHoverForeground" Value="{ThemeResource SystemBaseHighColor}" />
<Setter Property="NavButtonPressedBackground" Value="Transparent" />
<Setter Property="NavButtonPressedForeground" Value="{ThemeResource SystemBaseHighColor}" />
<Setter Property="NavButtonCheckedBackground" Value="{ThemeResource SystemAccentColor}" />
<Setter Property="NavButtonCheckedForeground" Value="{ThemeResource SystemAltHighColor}" />
<Setter Property="NavButtonCheckedIndicatorBrush" Value="Transparent" />
<Setter Property="VisualStateNarrowMinWidth" Value="{StaticResource NarrowMinWidth}" />
<Setter Property="VisualStateNormalMinWidth" Value="{StaticResource NormalMinWidth}" />
<Setter Property="VisualStateWideMinWidth" Value="{StaticResource WideMinWidth}" />
</Style>
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<Style TargetType="controls:HamburgerMenu">
<Setter Property="HamburgerBackground" Value="{ThemeResource SystemChromeMediumColor}" />
<Setter Property="HamburgerForeground" Value="{ThemeResource SystemBaseHighColor}" />
<Setter Property="NavAreaBackground" Value="{ThemeResource SystemChromeMediumLowColor}" />
<Setter Property="NavButtonBackground" Value="Transparent" />
<Setter Property="NavButtonForeground" Value="{ThemeResource SystemBaseHighColor}" />
<Setter Property="NavButtonHoverBackground" Value="Transparent" />
<Setter Property="NavButtonHoverForeground" Value="{ThemeResource SystemBaseHighColor}" />
<Setter Property="NavButtonPressedBackground" Value="Transparent" />
<Setter Property="NavButtonPressedForeground" Value="{ThemeResource SystemBaseHighColor}" />
<Setter Property="NavButtonCheckedBackground" Value="{ThemeResource SystemAccentColor}" />
<Setter Property="NavButtonCheckedForeground" Value="{ThemeResource SystemBaseHighColor}" />
<Setter Property="NavButtonCheckedIndicatorBrush" Value="Transparent" />
<Setter Property="VisualStateNarrowMinWidth" Value="{StaticResource NarrowMinWidth}" />
<Setter Property="VisualStateNormalMinWidth" Value="{StaticResource NormalMinWidth}" />
<Setter Property="VisualStateWideMinWidth" Value="{StaticResource WideMinWidth}" />
</Style>
</ResourceDictionary>
我该如何解决?