views:

1002

answers:

2

I need incorporate a syntax highlighting editor control into my application. It is required that the control be free and native .NET code only so the Scintilla.NET control is not feasible. The reason for this is because it is a ClickOnce application.

I would like answers that use WinForms or WPF. It doesn't have to be from the same vendor. It needs to basically support syntax highlighting, line numbers, and be reasonably fast for large files up to 100,000 and MUST be FREE!

I understand that this question has been asked before for they are usually muddled with commercial controls that require royalties or are not free or mention the Scintilla.NET control which is not native .NET code.

+1  A: 

You may want to see if the text control that was built for MonoDevelop 2 will help you out. Its integrated, and you'll need to see if the licensing suits you.

It does use GTK+, though, so you'd likely need to have the GtkSharp wrapper around GTK+. But it would be possible in theory to use it as a basis for something that sits on top of the GUI API system you're programming for.

ETA: You may also want to check out the code used in SharpDevelop, which runs on Windows. There are programmers in common between the two projects, as well.

Links: SharpDevelop, MonoDevelop

Michael Trausch
Maybe the text control for SharpDevelop would work, then? I recall the author of Kaxaml saying that he used that control.
Andy
That is certainly a possibility. I can edit my comment to include mention of that for sure.
Michael Trausch
MonoDevelop was forked from SharpDevelop some time ago (http://en.wikipedia.org/wiki/MonoDevelop). Both are open source, but SharpDevelop is more suited to integration with WinForms apps because it's not tied to GTK+.
Dave R.
These solutions are fairly good. I'm looking for a user control now the actual IDE itself. I understand that SharpDevelop has a user control that is an editor. It's number one on my list for now but are there any other options available?
Jeremy Edwards
+6  A: 

The SharpDevelop IDE is an open source Visual Studio alternative, and its editor provides syntax colouring and autocomplete for C# and other languages. The editor control can be used separately from the rest of the IDE, and there's an example in the samples that shows how you can integrate it into your own solution (samples\CSharpCodeCompletion I think).

Try the community forums if you have any difficulties:

http://community.sharpdevelop.net/forums/

It's written in C# and WinForms.

Dave R.