WPF Application Typing in Custom TextBox CPU Jumping from 3 to 80 percent
- by azamsharp
I have created a RichTextBox called SharpTextBox which indicates and limits the number of characters that can be typed in it. The implementation is shown in the following link:
http://www.highoncoding.com/Articles/673_Creating_SharpRichTextBox_for_Live_Character_Count_in_WPF.aspx
Anyway when I start typing in the TextBox it goes from 3% to 78%. The TextBox updates the Label control which shows the number of characters remaining for the count.
How can I increase the performance of the textbox?
UPDATE:
I read there seems to be some problem with the TextRange.Text property which kills performance.