When trying to do something more complex, I came across behavior that I do not quite understand.
Suppose the following code handles the textChanged event.
private void textChanged(object sender, TextChangedEventArgs e) { TextBox current = sender as TextBox; current.Text = current.Text + "+"; }
Now, by typing a character in the text box (say, A), you will get a double response (adding two "+"), with the last text displayed as A +.
My two questions: why did this event happen only twice? And why only the first start of the event really sets the text of the text field?
Thanks in advance!
Erik kerber
source share