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.
Syntax highlighting determines the color and style of source code displayed in the Visual Studio Code editor. It is responsible for colorizing keywords like if or for in JavaScript differently than strings and comments and variable names.
Syntax highlighting is a feature of text editors that are used for programming, scripting, or markup languages, such as HTML. The feature displays text, especially source code, in different colours and fonts according to the category of terms.
You can change (or apply) syntax highlighting for the active file by using the View as language drop down in the Formatting group of the Coding tab, or the syntax highlighting selector in the Status bar.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With