Customizing the toggle state of a toggle button in wpf

前端 未结 4 658
我在风中等你
我在风中等你 2020-12-30 11:48

I wanna customize the toggle state of the toggle button in wpf. I want to set a image to the toggle button when it is on and set another image when it is off. TO do so, i th

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-30 12:33

    Like Drew Noakes said, in my snippte there were only two images. So only two items were working properly. I solved this issue with the following snippet.

    
      
        
        
      
      
        
      
    
    

    Simple, I moved the triggers in to the data template. Dunno whether this is the correct answer thou'. Seems to be working

提交回复
热议问题