Click here to Skip to main content
13,198,322 members (65,802 online)
Rate this:
Please Sign up or sign in to vote.
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)
Posted 20-Feb-13 4:57am
ali rad 20-Feb-13 14:23pm
Is it possible put part of RichTextBox in WPF XAML here?
nbgangsta 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>
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171020.1 | Last Updated 20 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100