How to remove default mouse-over effect on WPF buttons?

后端 未结 8 513
北荒
北荒 2020-11-28 05:42

My problem is that in WPF, whenever I try and change the colour of a button\'s background using triggers or animations, the default mouseover effect (of being grey with that

8条回答
  •  一整个雨季
    2020-11-28 06:07

    This Link helped me alot http://www.codescratcher.com/wpf/remove-default-mouse-over-effect-on-wpf-buttons/

    Define a style in UserControl.Resources or Window.Resources

     
            
        
    

    Then add the style to your button this way Style="{StaticResource MyButton}"

    
    

提交回复
热议问题