WPF Menu Items Styles

Posted by Allen Ho on Stack Overflow See other posts from Stack Overflow or by Allen Ho
Published on 2010-03-12T03:27:43Z Indexed on 2010/03/12 4:27 UTC
Read the original article Hit count: 390

Filed under:
|
|
|

Hi,

I have an application resource of the following

<Style TargetType="{x:Type TextBlock}">
    <Setter Property="Background" Value="{DynamicResource windowTextBackColor}"/>
    <Setter Property="Foreground" Value="{DynamicResource windowsTextForeColor}"/>
</Style>

So all the text blocks in my application should assume those colours.

However the Menu and its containing MenuItems on my Main Window does not take these colours?

I have to do the XAML

for it to assume those colours, Is there a reason why setting a style that targets Text blocks does not work?

Thanks

© Stack Overflow or respective owner

Related posts about wpf

Related posts about menu