Can I get a WPF ListBox to inherit brushes from parent element?

Posted by Jay on Stack Overflow See other posts from Stack Overflow or by Jay
Published on 2010-03-12T14:10:05Z Indexed on 2010/03/12 14:27 UTC
Read the original article Hit count: 169

Filed under:
|
|
|

My WPF window has its foreground brush set to a brush from a resource dictionary, and I want all text in the window to have this color, so I don't touch the foreground brush in anything else.

Textboxes get the color
Textblocks get the color
Buttons get the color

Listboxes do not get the color, and so neither do their contents.

Is there any way to get a Listbox to behave like the other controls in this respect?

Assuming not, and that this is by design, what is the rationale?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about xaml