In WPF we don't have keypress event, generally people used keypress event in windows forms application to validate text input. Now in this example I have showed how you can validate input from textbox using PreviewTextInput event. In this example I validated input to accept float values, you can use this to validate integer or any other number type validation. For code follow link below:
http://www.techsapphire.in/news/keypr...
Watch video Keypress event in WPF to validate integer input in C# - PreviewTextInput online without registration, duration hours minute second in high quality. This video was added by user techsapphire 05 March 2016, don't forget to share it with your friends and acquaintances, it has been viewed on our site 13,483 once and liked it 75 people.