Does anyone know how to control the the insertion mode of a WPF RichTextBox. I want to force the RichTextBox to always be in overwrite mode rather than insert.
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.
Unfortunately there doesn’t seem to be a documented way of doing this. The only way I know is to use reflection, as below, but this technique accesses internal workings of the RichTextBox. It works in current versions of WPF but there is no guarantee that it will continue to work going forward, so use it at your own risk.
The above needs to happen after the constructor.