Click here to Skip to main content
Rate this: bad
good
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
4GB RAM
Windows 8 64-bits (pre-installed)
Posted 20-Feb-13 4:57am
Groulien2.7K
Comments
ali rad at 20-Feb-13 14:23pm
   
Is it possible put part of RichTextBox in WPF XAML here?
nbgangsta at 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="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" title="LagTest" height="300" width="300"> <grid> <richtextbox name="Rich" grid.column="0" grid.row="0" horizontalalignment="Stretch" verticalalignment="Stretch"></richtextbox> </grid> </window>
   
Can you add a screenshot of how it looks?
Josh_T at 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 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
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 680
1 OriginalGriff 379
2 Manas Bhardwaj 350
3 Abhinav S 293
4 Sampath Lokuge 245
0 Sergey Alexandrovich Kryukov 7,647
1 OriginalGriff 4,287
2 Peter Leow 3,681
3 Maciej Los 3,515
4 Er. Puneet Goel 3,107


Advertise | Privacy | Mobile
Web04 | 2.8.140415.2 | Last Updated 20 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid