If I have a subclass of ContextMenu
(for example) called MyContextMenu
and I define a style in my MergedDictionaries
with TargetType=ContextMenu
, why does this style not apply to instances of MyContextMenu
?
It does work for all of the instances of the base class, but not any of the subclasses.
I can create additional styles and use BasedOn
, but that isn't clean. It seems like it should work without that.
I have made sure that my subclasses call the base constructor, and have verified DefaultStyleKey
to be the type of my base class.