Are there any open-source free replacements for a richtextbox in WPF?

Go To StackoverFlow.com

1

I have a requirement to create an application that will open up about 10 mb log files and highlight certain expressions.

I thought using WPF and richtextbox will work, but the richtextbox rending time is unacceptable.

Is there anything that has richtextbox like highlighting, but has better performance?

There any other way to accomplish this?

2009-06-16 19:25
by David Basarab


1

Scintilla http://www.scintilla.org/ is used as a box for editing code. It provides highlighting for many different code syntax. You may be able to use it and specify the portions you need highlighted.

2009-06-16 19:31
by bnbeckwith


1

If you do not need to allow the user to edit the logs you may be able to get away with using a TextBlock and wrap the sections to be highlighted in <Style> tags which accomplish the highlighting.

2009-06-16 19:34
by Rob Allen


0

How are you generating your Flowdocument - depending on what you are doing you may be able to speed it up. However, I too have run into these issues, especially because you have to generate the FlowDocument on the UI thread and if it takes too long you end up with a black screen.

2009-06-17 15:11
by Paul Betts


0

If I understand what you're saying, you want a syntax highlighting RTB control. My personal favorite is the AvalonEdit control, (Here's an article on codeproject about it: http://www.codeproject.com/Articles/42490/Using-AvalonEdit-WPF-Text-Editor) which can syntax highlight like the editor in Visial Studio. It even has autocomplete, which your end users will love.

If you want something else, there's also the ICSharp Code editor. (Here's another article on codeproject about it: http://www.codeproject.com/Articles/30936/Using-ICSharpCode-TextEditor) This one pretty much has the same features as AvalonEdit, and I like this one as well. I actually used ICSharp Code editor in an app I made, and was pretty satisfied with the features.

As far as I know, both of these controls are very efficient, and would be better than just a richtextbox.

2014-01-01 20:56
by user2226109
Ads