I have am creating a WPF extension to an existing Win32 MFC client application. Within a UserControl located in my WPF class library, I am merging libraries as follows:
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="MyResourceDLL;Component/dictionaries/styles.xaml"/>
</ResourceDictionary.MergedDictionaries>
I also tried
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MyResourceDLL;Component/dictionaries/styles.xaml"/>
</ResourceDictionary.MergedDictionaries>
In either case, I get the following XamlParseException:
System.Windows.Markup.XamlParseException occurred
Message="MyResourceDLL;Component/dictionaries/styles.xaml' value cannot be assigned to property 'Source' of object 'System.Windows.ResourceDictionary'. Cannot locate resource 'ems.wpf.resources;component/dictionaries/styles.xaml'. Error at object 'System.Windows.ResourceDictionary' in markup file 'SARMaster.Maryln.EphemerisLib;component/getephemeriscontrol.xaml' Line 9 Position 37."
I there a way I can load a relative DLL that is not referenced by main project?