Use single ResourceDictionary for multiple themes WPF?

You can merge resource dictionaries. Declare your common stuff in one file, then for the differentiated parts make each one it's own file and merge it with the common file.

Up vote 1 down vote favorite share g+ share fb share tw.

I have a control that has a lot of themes and each theme is represented by a ResourceDictionary. The problem is that the dictionaries are almost identical and they differ only in the beggining where I have declared color brushes, for example: These brushes (and other xaml objects for style) are used here and there on the same place, like this: How to move the same elements with different brush like above in a single file? There are aslo other elements that do not depend on the brushes, but they are nested or have nested dependant controls.

What will be the best solution in this situation, as I do not want to edit 15+ files for a single dummy change? Wpf xaml resourcedictionary link|improve this question edited 9 hours ago asked 9 hours agoIvan Stefanov616 100% accept rate.

You can merge resource dictionaries. Declare your common stuff in one file, then for the differentiated parts make each one it's own file and merge it with the common file. See msdn.microsoft.com/en-us/library/aa35017....

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions