[ACCEPTED]-WPF: Textbox not firing onTextInput event-textinput
Your handler for the
TextInput event is not fired 4 because the
TextBox is handling the event. You 3 could try using the TextChanged event instead, since 2 really you just want to know when characters 1 were added or removed from the
InitializeComponent(); textbox.AddHandler(TextBox.TextInputEvent, new TextCompositionEventHandler(TextBox_TextInput_1), true);
Use "PreviewTextInput" instead, it will 1 work.
Create a new class derived from TextBox. In 3 the new class override the OnTextInput method. Your 2 OnTextInput method will get called before 1 the TextBox gets it.
More Related questions