0
我們的應用程序的樣式使用ResourceDictionary
。這種資源字典本身包含的資源字典這樣的:如何在WPF中只更改一個合併的資源字典?
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="BridgeIt5/General.xaml" />
<ResourceDictionary Source="BridgeIt5/Brushes.xaml" />
<ResourceDictionary Source="BridgeIt5/Constants.xaml" />
<ResourceDictionary Source="BridgeIt5/Button.xaml" />
...
</ResourceDictionary.MergedDictionaries>
所以,現在取決於構建配置,我們只是想改變Brushes.xaml合併資源字典。如何才能做到這一點?