WPF's RichTextBox control's performance is real slow when a 50KB text document is loaded. Scrolling laggy and pressing Ctrl-A to select all the text takes more than 10 seconds. (This is intantaneous on Notepad).
I'm not doing any fancy bitmap effects. Is this normal? Even typing on an empty RichTextBox seems a bit laggy than normal.
Are there fixes for this? Alternatives? Thanks!
You might need to consider using a different text box control.
Daniel Grunwald has written the Wpf text editor for SharpDevelop completely from scratch. It is called AvalonEdit and a good article is on codeproject:
http://www.codeproject.com/KB/edit/AvalonEdit.aspx
It seems that he has done optimizations for large files.
I bet Scintilla will outperform most (if not all) free alternatives out there. For WPF
, use a WPF
wrapper. E.g. ScintillaNET.WPF (haven't tried it though).
Pros
Cons
WPF
features to work. E.g. scaling, touch...If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With