Textbox value changed

后端 未结 5 1325
天命终不由人
天命终不由人 2020-12-07 03:08

Is it possible to know if any of the textbox values have changed in the application. I have around 30 textboxes and I want to run a part of code only if, any of the textbo

5条回答
  •  囚心锁ツ
    2020-12-07 03:45

    You can also just do this:

    In your Constructor:

    MyTextBox.TextChanged += new TextChangedEventHandler( TextChanged );
    

    And Then this Method:

    private void TextChanged(object Sender, TextChangedEventArgs e){
                //Do something
            }
    

提交回复
热议问题