覆盖PhoneAccentColor不起作用

时间:2011-05-05 11:59:55

标签: windows-phone-7 resourcedictionary

我只想在我的应用程序中自定义PhoneAccentColor,但它似乎无法正常工作。

我让App Resources看起来像:

<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="Utils/Converters.xaml"/>
            <ResourceDictionary Source="Resources/Styles.xaml"/>
        </ResourceDictionary.MergedDictionaries>
        <ViewModels:ViewModelLocator x:Key="ViewModelLocator" d:IsDataSource="True" />
        <Resources:ResourcesWrapper x:Key="ResWrapper" d:IsDataSource="True" />
    </ResourceDictionary>
</Application.Resources>

在Styles.xaml中,我重新定义了PhoneAccentColor,如下所示:

<Color x:Key="PhoneAccentColor">#FFFF0000</Color>

但由于任何原因,仍然使用默认的手机强调色。 例如,我使用工具箱中的PerformanceProgressBar,它仍然使用默认颜色而不是定义的红色。

我错过了什么吗?

1 个答案:

答案 0 :(得分:1)

已解决:似乎您还必须在Styles.xaml中覆盖。

相关问题