Enable button based on TextBox value (WPF)

后端 未结 6 1727
無奈伤痛
無奈伤痛 2021-02-06 02:53

This is MVVM application. There is a window and related view model class.

There is TextBox, Button and ListBox on form. Button is

6条回答
  •  不要未来只要你来
    2021-02-06 03:28

    I know this is an old question but I personally think it's easier to bind the textbox Length to button's IsEnabled property, e.g.:

    
    
    

提交回复
热议问题