Tried finding the answer myself but couldn’t find a good example.
So I want a masked textbox in wpf that only accepts numbers and a comma.
For example: 35,5
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would create a custom control that inherits from the standard text box control. Then I’d add an event handler to the TextChanged event and check the character typed, and revert the change if it’s an invalid character (or something along those lines)
There’s quite a few useful controls here that will save you the job: