Setting style of ContextMenu on subitems

Posted by thedesertfox on Stack Overflow See other posts from Stack Overflow or by thedesertfox
Published on 2010-03-12T21:34:12Z Indexed on 2010/03/12 21:37 UTC
Read the original article Hit count: 457

Filed under:
|

I have created a custom style and template for MenuItem and ContextMenu, and for my first level, that works great, but whenever I add a SubMenu item, the style of that ContextMenu reverts back to the default style. How can I make sure that item uses my custom style? I've tried using the <;Style TargetType="ContextMenu" Key="{x:Type ContextMenu}" syntax as well, and it doesn't seem to be overriding it either.

© Stack Overflow or respective owner

Related posts about wpf-controls

Related posts about wpf