WPF template for yes/no ToggleButton

前端 未结 2 545
天涯浪人
天涯浪人 2021-02-11 05:09

Can anyone help me with a simple template to make a WPF ToggleButton show \"yes\" or \"no\" depending on it\'s toggle state?

I dont want it to look like a button though,

2条回答
  •  借酒劲吻你
    2021-02-11 05:44

    Building up on @Batuu's reply, to be just left with the content as text just update the style to

    Updated

    
    

    Addition here compared to original reply is

      
        
          
            
          
        
      
    

    You basically set the template of the button to just be the content that it holds.

提交回复
热议问题