I\'d like to set the foreground (text) color to all of my elements You\'d think this would be easy, but it\'s not...
<
Sadly the way the styles work in WPF you can't create a generic style on a parent class and have it apply to the sub-classed control.
One thing you can do is create a base style that targets a base type with the property you want to set (like ContentControl) and then create a specific style for each control that is BasedOn that style. Here is an example:
Hope this helps.
EDIT:
You could use Pavlo's method below for restoring inheritance and make it a little easier to use like so:
At least then you don't have to copy the same setter code everywhere (BTW, I think the TextBlock inherits by default; no default style with overrides).