Command for WPF TextBox that fires up when we hit Enter Key

前端 未结 5 2089
太阳男子
太阳男子 2020-12-04 17:31

It is very easy to bind Buttons in WPF apps to Commands in a VIEWMODEL class. I\'d like to achieve a similar binding for a TextB

5条回答
  •  独厮守ぢ
    2020-12-04 17:51

    I like Sarh's answer, but it wouldn't work in my program, unless I changed Enter to Return:

    
        
            
       
    
    

提交回复
热议问题