Click here to Skip to main content
15,567,994 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello CP,

I'm currently working on an WPF application which uses a RichTextBox. Unfortunately I'm having some difficulties.
The WPF RichTextBox (with default settings, no spellcheck) occasionally lags when I'm typing (or just holding down any key). It gives the appearance of unresponsiveness and that's undesirable.

When I couldn't find a fix, I decided to replace it with the RichTextBox from Windows Forms.
The lag is gone but the text loses its formatting (bold, italic, etc.) when using LoadFile or setting the RTF property.

Does anyone know how to remedy either problem?

I doubt that it's my system but these are the specs(this thing isn't even 6 months old!):
AMD A6-4400M APU with Radeon HD Graphics (2 CPUs), ~2.7GHz
Windows 8 64-bits (pre-installed)
aliwpf 20-Feb-13 14:23pm    
Is it possible put part of RichTextBox in WPF XAML here?
Groulien 20-Feb-13 14:25pm    
Even a simple form shows the issue.
It might not show on really powerful computers.
<window x:class="LagTest.Window1" xmlns="" xmlns:x="" title="LagTest" height="300" width="300">
<richtextbox name="Rich" grid.column="0" grid.row="0" horizontalalignment="Stretch" verticalalignment="Stretch"></richtextbox>
Michael Haephrati 20-Feb-13 15:01pm    
Can you add a screenshot of how it looks?
Josh_T 28-Feb-13 23:03pm    
I too am having the typing lag issues with RichTextBox. I even created a brand new WPF project with just a plain <richtextbox> control in it and it lags. I even tried buiding it and running directly from the executable, still typing lag.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900