While trying to do something a bit more complicated, I ran across a behavior I don't quite understand.
Assume the following code below handling the textChanged event.
private void textChanged(object sender, TextChangedEventArgs e)
{
TextBox current = sender as TextBox;
current.Text = current.Text + "+";
}
Now, typing a character in the textbox (say, A) will result in the event getting tripped twice (adding two '+'s) with the final text displayed being just A+.
My two questions are, why is the event hit just twice? And why does only the first run through the event actually set the text of the textbox?
Thanks in advance!