hello everyone
I am using resource dictionaries and now I need to call a resource in another.
to be clear I am making a resource which keeps colors and using another to style a control. in second resource I need to call a color using it's key. is it possible? and if so, how?
here is my codes:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"><ResourceDictionary.MergedDictionaries><ResourceDictionary Source="Color.xaml"/><ResourceDictionary><Style TargetType="{x:Type Button}"><Setter Property="Width" Value="100"/><Setter Property="Background" Value="Transparent"/></Style></ResourceDictionary></ResourceDictionary.MergedDictionaries></ResourceDictionary>
instead of the value "Transparent" i need to call a color in this resource:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"><SolidColorBrush x:Name="A x:Key="Ablue /><Color x:Key="Main">#FF179EDC</Color></ResourceDictionary>