views:

1474

answers:

4

I'm currently looking for a Syntax highlighter for a WPF application. A textbox will be available for the user to type into which would hopefully recognise code and highlight syntax accordingly.

I would like to support C# initialy and other languages later.

Duplicate of Question 394751

+3  A: 

I think this question has your answer.

http://stackoverflow.com/questions/394751/anyone-know-a-code-editor-i-can-embed-in-a-wpf-window-or-windows-forms

Or you can write one yourself: http://blogs.microsoft.co.il/blogs/tamir/archive/2006/12/14/RichTextBox-syntax-highlighting.aspx

Smazy
Thanks, didn't find that in the search.
Ray Booysen
+1  A: 

Some time ago i've found this blog post with a tutorial on how to create a custom syntax highlight control from a RichTextBox. Maybe it could be usefull for you too.

Stefano Driussi
A: 

I was looking for the same thing without success. Only solution I found is Actipro's Syntax Highlighter for WinForms that can be hosted in WPF application. AFAIK Actipro is working on WPF version but I don't know if it ready or not

aku
+1  A: 

If you do not mind having no documentation whatsoever, AvalonEdit is a good choice. I am currently using for a project, and it is a great tool. I have not encountered a single bug even in complex scenarios.

Andrey Shchekin
Where can it be downloaded? There seems to be no d/l page for it...
Dmitri Nesteruk
It is in the svn://svnmirror.sharpdevelop.net/sharpdevelop/trunk/SharpDevelop (do not remember the exact path), source only (but very easy to build).
Andrey Shchekin