2011-05-05 74 views
1

我只想在我的應用程序中自定義PhoneAccentColor,但它似乎不起作用。覆蓋PhoneAccentColor不起作用

我做了應用程序的資源看起來像:

<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

解決:似乎你也必須重寫Styles.xaml中的。 – Kornelis 2011-05-05 12:24:06

+1

你應該把這個作爲答案,然後投票,讓其他人可以看到你的問題已經解決。 – johnhforrest 2011-05-05 14:55:09

回答

1

解決:似乎你也必須重寫Styles.xaml。