views:

224

answers:

1

I am working on a WPF solution that has several WPF projects--en EXE and several user control DLLs. I'm building a Composite WPF app, and each of the DLLs are modules.

I have created a resource dictionary to provide common styling for all WPF visual components, which I have added to each project in the solution. It works, but it's a real pain, because each time I make a change to the resource dictionary, I have to change the copy in each project.

What I would like is a for a single copy of the resource dictionary to apply to all projects is the colution. Is there any way to do that?

Here is what I have tried so far:

  • Import the dictionary into App.xaml of the main project: That only covers the main project, not the DLL projects.
  • Put the resource dictionary in a 'Common' project:That doesn't work, because the tag can't reach outside the current project to find a dictionary.

Is there a way to get this done? Thanks for your suggestions.

A: 

I think this will help you. I've never used it but I read about it.

Carlo
Thanks. I have implemented the ComponentResourceKey approach as described in the book, and it works perfectly.
David Veeneman
Glad I could help =)
Carlo