key = "Color1" value = "Black"
key = "Color2" value = "Red"
<ResourceDictionary ... >
<Style x:Key="MainWindowStyle" TargetType="Window">
<Setter Property="SizeToContent" Value="WidthAndHeight" />
<Setter Property="Background" Value="RoyalBlue" />
</Style>
<Style TargetType="Label">
<Setter Property="Margin" Value="0,5,0,5" />
</Style>
<Style TargetType="TextBox">
<Setter Property="Margin" Value="0,5,0,5" />
</Style>
<StaticResource x:Key="DarkBlue11" ResourceKey="DarkBlue"/>
<SolidColorBrush x:Key="TextBoxBackgroundBrush" Color="{DynamicResource DarkBlue11}" />
</ResourceDictionary>
<ResourceDictionary ... >
<Style x:Key="MainWindowStyle" TargetType="Window">
<Setter Property="SizeToContent" Value="WidthAndHeight" />
<Setter Property="Background" Value="RoyalBlue" />
<StaticResource x:Key="DarkBlue11" ResourceKey="DarkBlue"/>
<SolidColorBrush x:Key="TextBoxBackgroundBrush" Color="{DynamicResource DarkBlue11}" />
</Style>
<Style TargetType="Label">
<Setter Property="Margin" Value="0,5,0,5" />
</Style>
<Style TargetType="TextBox">
<Setter Property="Margin" Value="0,5,0,5" />
</Style>
</ResourceDictionary>
Application.Current.Resources["DynamicBG"] = Brushes.Aquamarine;
или
Application.Current.Resources["DynamicBG"] = Brushes.CadetBlue;
я несу огромные потерисколько миллионов долларов?