226

I have resource dictionary files (MenuTemplate.xaml, ButtonTemplate.xaml, etc) that I want to use in multiple separate applications. I could add them to the applications' assemblies, but it's better if I compile these resources in one single assembly and have my applications reference it, right?

After the resource assembly is built, how can I reference it in the App.xaml of my applications? Currently I use ResourceDictionary.MergedDictionaries to merge the individual dictionary files. If I have them in an assembly, how can I reference them in xaml?


  • This may be an overkill, but you may want to prepare your resources for Export using the technique described here: alexfeinberg.wordpress.com/2015/08/16/…. The main advantage of doing this is to prevent problems with multiple versions of the resource assembly getting loaded into same appdomain. - user195275

Linked


Related

Latest