How can I restrict TextBox to accept only capital letters, or for example digits, or forbid to put any special character?

Sure it's a piece of cake to catch TextInput event and handle the text here, but is it the proper way to do this?

Edit
Report