WPF : Re-usable template for image buttons?

后端 未结 3 821
长发绾君心
长发绾君心 2020-12-16 06:35

My WPF project uses a lot of image buttons, but since I haven\'t found a way to do it properly (I have to write the same triggers and style each time, only difference is the

3条回答
  •  甜味超标
    2020-12-16 07:17

    You can use the BasedOn Attribute like this:

    
    

    This will make a Button Style with the same attributes as your ButtonStyle, but with a DeepSkyBlue Background.

提交回复
热议问题