How to hookup TextBox's TextChanged event and Command in order to use MVVM pattern in Silverlight

前端 未结 10 2371
一整个雨季
一整个雨季 2020-12-15 18:19

Recently, I realized that MVVM pattern is so useful for Silverlight application and studying how to adopt it into my project.

BTW, how to hook up the textbox\'s text

10条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-15 18:46

    I had the same question. Then I find this article.

    http://deanchalk.com/wpf-mvvm-property-changed-command-behavior/

    1. Create behavior (behavior recive value to changend event and command to changend)
    2. Implement behavior in your WPF
    3. Bind Behavior your command to a ValueChanged

提交回复
热议问题