0

我尝试覆盖 AppBarItem 和键盘的默认主题,但应用程序栏项目的强调色仍然保持默认,我使用的资源如下所列。是否可以在代码中更改 AppBarItem 的背景和按下状态下的手机键盘背景?

"PhoneAccentBrush",
"ButtonPressedBackgroundThemeBrush",
"ProgressBarIndeterminateForegroundThemeBrush",
"ProgressBarForegroundThemeBrush",
"ToggleSwitchCurtainBackgroundThemeBrush",
"SliderTrackDecreaseBackgroundThemeBrush",
"CheckBoxPressedBackgroundThemeBrush",
"AppBarBackgroundThemeBrush",
"AppBarBorderThemeBrush",
"AppBarItemBackgroundThemeBrush",
"AppBarItemPointerOverBackgroundThemeBrush"
"AppBarItemPressedBackgroundThemeBrush"
4

1 回答 1

0

你能试试这个吗:

App.xaml.cs页面中:

<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.ThemeDictionaries>
            <ResourceDictionary x:Key="Default">
                <SolidColorBrush x:Key="TheRecourceKeyHere" Color="Magenta" />
            </ResourceDictionary>
        </ResourceDictionary.ThemeDictionaries>
    </ResourceDictionary>
</Application.Resources>

更多信息:在应用程序中覆盖强调色

于 2015-10-13T13:12:37.507 回答