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
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: