I know you can set a default style if you don't specify a x:Key
property. (so it apply to all elements from the type specified in TargetType
)
I want to use a key for inheritance (BasedOn
property), but still keep it default.
I thought about creating another style who is just based on on the previous one. like this:
<Style TargetType="Button" x:Key="name">
//...
</Style >
<Style TargetType="Button" BasedOn="name"/>
But I would prefer it if there is a neater way to do it.