c# - perfect syntax highlighting

AvalonEdit is the WPF-based text editor used in SharpDevelop 4.0. It has built-in support for syntax highlighting for several languages and you can add new highlighting definitions using an XML-based file format.

AvalonEdit is open-source, but can also be used in commercial applications (MIT licensed since AvalonEdit 5.0).

If you don't want to use WPF, you could also use ICSharpCode.TextEditor, the old Windows Forms text editor from SharpDevelop 3.x.


Give a look to these open source projects:

  • ScintillaNET
  • dotNetFireball