I am creating a wpf application. I have to make all textbox first letter to capital, if a user entered in small then it should be formatted in capital on mouse out.I need the best way to do it, please someone help me.
Share
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.
The best way of doing it greatly depends on how you are doing your app, but @H.B.’s answer is probably the way to go.
For the sake of completeness, another way if doing it would be to use a converter like so:
This assumes that your window’s data context is set to an instance of a class that has a read/write property named SomeProperty of type string.
The converter itself would be something like this:
You can learn more about converters here.