How to base a style on another style in a resource dictionary?

后端 未结 3 1838
时光取名叫无心
时光取名叫无心 2020-12-25 12:27

I have a theme that is applied to all buttons in a resource dictionary. Now I want to add a trigger to the button while inheriting the style changes from the dictionary. I t

3条回答
  •  青春惊慌失措
    2020-12-25 13:32

    Give your base Style a name, say FooStyle.

    In the example you gave, modify the TargetType and BasedOn to look as follows:

     
    

提交回复
热议问题