Hello
I need a sample where it has been shown how to create a text editor which can highlight syntax.
The language is a custom language with some functions and identifiers. The function list is available as a list of strings. Identifiers start and end with a particular set of characters.
Kindly advise.
Thanks
Abhishek
Hello Abhishek,
I am just checking about the progress of this issue. Let me know if you need my further assistance on this issue.
Thank you for using Infragistics Components.
Hi Abhishek,
If you want to have “on-the-fly” syntax editor, the only option is to use the XamSyntaxEditor and to host it inside ElementHost control. Also the recommended way to create an ENBF file with the grammar definition for your language. Then you will be able to generate a custom language class using the GenerateClass method of the LanguageGenerator method. An alternative method is to also manually define a custom language class (it needs to inherit LanguageBase class).
I have attached a sample with the XamSyntaxEditor inside an ElementHost, with a custom language.
Please let me know if you have any additional questions.
Hi Hristo
Since a Winforms syntax editor does not exist, kindly provide the sample for xamSyntaxEditor.
As I mentioned, we have the list of functions as a list of string and identifiers start with a "[" and end with "]"
We would like to add the symbols programmatically rather than through EBNF file.
I looked up the samples for xamSyntaxEditor, and while there is a custom language with EBNF sample, I couldnt find the programmatic custom language sample.
Best
The sample "Custom Language syntax parsing" has a text box where it allows you to type in and has RichTextbox which shows colored syntax on pressing of a button.
A normal syntax editor does this "on-the-fly" - so I need a sample where text is edited straightaway in the richtextbox.
Hello ,