Transparent button background in WPF using style

前端 未结 4 1535
-上瘾入骨i
-上瘾入骨i 2021-02-14 17:32

I\'ve found this topic about setting the border of a button to transparent. This works fine, but I want to use this for the button background and not the border.

Soluti

4条回答
  •  太阳男子
    2021-02-14 17:58

    Found the solution for my issue:

    Apparently you have to add the triggers within the ControlTemplate under ControlTemplate.Trigger. Andd after you've done that the thing with borders is that you have to set a TargetName in the Border tag and then set the reference (-> TargetName="XXXXX") to the properties which you've named in the border tag.

    So:

    
    
    

提交回复
热议问题