KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have created a custom control inheriting TextBox . This custom control is a numeric TextBox , only supporting numbers. I am using OnPreviewTextInput to check each new character being typed to see if the character is a valid input. This works great. However, if I paste the text into the TextBox , OnPreviewTextInput is not fired. What is the best way to capture pasted text in a TextBox ? Also, I have a problem when the back space is pressed, I can't figure out what event this will fire. OnPreviewTextInput is not fired! Any ideas how to capture pasted text and back space events in WPF TextBox ?
Tags (comma-separated)
Save Edits
Cancel