A textbox/richtextbox that has syntax highlighting? [C#]

Viewed 51214

Where can I find a control for WinForms that will highlight source code pasted into it? I would like one that has syntax highlighting support for many different languages but if it only works with C# I would be fine with that also.

8 Answers

If you're willing to pay for a control, I highly recommend this one: QWhale Syntax Edit. It's got a ton of features, comes with source code, and supports a lot of languages. I use it myself for C#, VB.NET, SQL (MS & Oracle), and it's got everything that VS provides.

Not sure if there is any out of the box non-thirdparty solution to this.

But, have you looked at Actipro SyntaxEditor component. LinqPad, the ubercool linq tool uses it for syntax highlighting and intellisense.

Check out the AvalonEdit control. There is a good article on CodeProject explaining how to use it.

Related