How to change button content when clicked in Xaml?

前端 未结 3 522
被撕碎了的回忆
被撕碎了的回忆 2021-01-18 05:49

I have buttoncontent named Hold button. Once when I clicked button the button content should change to Resume, again if pressed resume button means Hold should be visible.

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-18 06:07

    Maybe you can use ToggleButton instead of Button so you can bind to IsChecked property. http://msdn.microsoft.com/en-us/library/system.windows.controls.primitives.togglebutton.ischecked.aspx

    For example:

        
            
                
            
        
    

提交回复
热议问题