How to track which character is deleted in TextBox in WPF?

Posted by Ashish Ashu on Stack Overflow See other posts from Stack Overflow or by Ashish Ashu
Published on 2010-06-16T08:08:34Z Indexed on 2010/06/16 8:12 UTC
Read the original article Hit count: 242

Filed under:
|
|

I want to track which character is deleted by the user through Delete or BackSpace Key.

I am handling RichTextBox_ChangedEvent of textbox.

Can I extract the deleted character from TextChangedEventArgs *e.Changes* and if yes How can I do that?

I want to restrict user to from deleting any characters from the TextBox. I want user can delete only two characters ( let's say "(" or ")" )

Please suggest.

© Stack Overflow or respective owner

Related posts about wpf

Related posts about textbox