SharpSyntax

sharpsyntax is a control extending RichTextBox by providing syntax higlighting capabilities.

Release includes binaries, source code and basic language definitions for C#, T-SQL and DOS Batch.

How to use

Include sharpsyntax project in your solution or just add a reference to sharpsyntax.dll.

Compilation should add a new item in your toolbox:

SyntaxTextBox behaves just like a regular RichTextBox. Drop it onto your form and customize its properties.

Once setup you have to set the language the control will higlight. Nothing easier than setting the Language property of the control.

To define a language you can programmatically build a Language object or let it load from an xml custom format language definition file.

Language language = Language.Deserialize("c#.xml");
 
syntaxTextBox.Language = language;

You can create new language definitions file or edit existing ones using the test application included in the release

Everything should be self-explanatory, if not feel free to ask

[ad]

 

Downloads

SVN

Up to date source code can be found at: https://elvenprogrammer.svn.beanstalkapp.com/projects/trunk/sharpsyntax

Leave a Reply

Your email address will not be published. Required fields are marked *