In my VSTO Application, I need to use the ResourceDictionary which is in separate assembly.
I created a separate ResourceDictionary named generic.xaml
in the VSTO application under themes
folder like /themes/generic.xaml
. In that file, I have referenced the ResourceDictionary from the external assembly using the Pack URIs.
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/ExternalAssemblyName;component/Themes/resource.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
Also changed AssemblyInfo to the following:
[assembly: ThemeInfo(
ResourceDictionaryLocation.None,
ResourceDictionaryLocation.SourceAssembly)]
But still found no luck. Any help would be good.
P.S. Please don't suggest putting ResourceDictionary in App.Xaml because I am working on VSTO application so there will be no App.xaml.