Sorry if that title doesn't make sense. I'm learning WPF and looking for a way to declare brush resources (eventually styles) in a single place and use them throughout the application which will have the UI in several different class libraries. I have a
class library project named Common that all of the UI class libraries can reference. The book I'm using says that the ComponentResourceKey markup extension is designed for this purpose in which you have to create a Themes folder containing a file named generic.xaml.
I've found that I can also just create a resource dictionary named anything in my Common project and then merge it with each Window's resouce dictionary using pack uri syntax:
What is the difference between the two approaches? Why be forced to use a specific path and file name when you can do it the second way? Additionally, is there a way to reference the resource globally for the class library project so that I don't have to put
it in each window/control? Can a class library have an App.xaml? Thanks!
View Complete Post