I want to track which character is deleted by the user through Delete or BackSpace Key.
I am handling TextBox_ChangedEvent of textbox.
Can I extract the dele
I don't know WPF but assuming that it's same as WinForms for this (seems probable). The only way I know of is that you actually keep the current text in a variable and on text change, if it's not a delete or backspace, you update that text, otherwise you use it compare what's changed and if that change should be allowed.
Edit: Looking at TextChangedEventArgs.Changes
it seems like the way I describe above might still be the way to go, but that you maybe could use the Changes
to compare the texts more efficiently.
You might already have thought about it, but otherwise, remember to handle cut and paste also (and that the user might be doing that with the mouse rather than the keyboard).