Is there a way to replace all the brush definitions for a WPF application at runtime, and only declare the styles that use it once? This would be useful for different color schemes, but keep the same UI and declare it once. All the examples I can find duplicate the styles in the different theme files - is this the only way to do it?
Little example:
Blue.xaml
<SolidColorBrush x:Key="DefaultBackgroundBrush" Color="Blue"/>
Yellow.xaml
<SolidColorBrush x:Key="DefaultBackgroundBrush" Color="Yellow"/>
generic.xaml?
<Style TargetType="{x:Type Button}">
<Setter Property="Background" Value="{StaticResource DefaultBackgroundBrush}" />
</Style>