We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Lexem Issue

Thread ID:





114764 Dec 6,2013 03:43 PM UTC Dec 19,2013 06:01 AM UTC WPF 5
Tags: Tools
Kevin Nichols
Asked On December 6, 2013 03:43 PM UTC

I'm trying to color a simple string like "hello" with custom lexem and it doesn't seem to work.  I know it can work because the SQL language built in highlights it just fine.  Is there a way to view the resources for the SQL language to see how this is done?  The problem with this one is that it highlights green but nearby text also highlights in some cases. 

<syncfusion:Lexem StartText=""[\w]+"" IsRegex="True" ContainsEndText="False" IsMultiline="False" LexemType="Literals" FormatName="ReturnFormat"/>


Karuppasamy P [Syncfusion]
Replied On December 12, 2013 04:41 AM UTC

Hi Kevin,

Thanks for using Syncfusion Products.

We have done a sample in which the strings get highlighted using Lexem in CustomLanguage. 

Kindly go through the sample, and if this is not your scenario please revert back to us with modified sample and share more details related to this query with us, it would be helpful for us to understand your requirement clearly.

Karuppasamy P


Kevin Nichols
Replied On December 12, 2013 08:26 PM UTC

Sorry I wasn't clear in my question.  I want to color a string green IF it is enclosed by quotes.


"Hello" would be green

Hello would be black


Kevin Nichols
Replied On December 12, 2013 08:47 PM UTC

I have it working now.  It works without regular expression.

<syncfusion:Lexem StartText=""" EndText=""" ContainsEndText="False" IsMultiline="False" FormatName="ReturnFormat"/>

Kevin Nichols
Replied On December 12, 2013 09:10 PM UTC

Well with this method brackets will not work.  With this input the quoted value is correct but everything adjacent to the right of bracket value is colored.


<syncfusion:FormatsCollection x:Key="CustomLanguage">

<syncfusion:EditFormats Foreground="Green" FormatName="ReturnFormat"/>

<syncfusion:EditFormats Foreground="Purple" FormatName="ValueFormat"/>


<syncfusion:LexemCollection x:Key="CustomLangaugeLexem">

<syncfusion:Lexem StartText=""" EndText=""" ContainsEndText="False" IsMultiline="False" FormatName="ReturnFormat"/>

<syncfusion:Lexem StartText="[" EndText="]" ContainsEndText="True" IsMultiline="False" FormatName="ValueFormat"/>


Karuppasamy P [Syncfusion]
Replied On December 19, 2013 06:01 AM UTC

Hi Kevin,

Sorry for the delay being caused.

It seems an issue in the Edit Control. We have created an incident #117133 in the Direct Trac, kindly follow the same for further technical updates.

Karuppasamy P


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon