Search code examples
wpfresourcedictionaryclass-library

how to access resource dictionary in a WPF class Library?


Here is the scenario. I have a WPF project A which is the startup project. And a class library B containing Views and Images. Both A and B have images. I have set them as resource. In a i have declared my resources of A in App.xaml using merged resource dictionary.

Now i want to declare a resource dictionary in B and use the resources in views defined in B. Please Help.


Solution

  • Take a look at the Pack URI Syntax to create references to XAML resources located in separate assemblies.