How to change\set background image of a button in C# WPF code?

后端 未结 3 1941
陌清茗
陌清茗 2020-12-05 20:54

I\'m trying to change background image of my button to some other image and I encountered some errors. This is the code I have on my xaml:

    
3条回答
  •  再見小時候
    2020-12-05 21:38

    I give a code snippet below, assing the style mentioned in code snippet to a button or to a toggle button, then you shall ve the changed background controlled totally by XAML...no other coding needed. I am not givin all the code just try to understand the logic behind ;)

    
    
    
    

提交回复
热议问题