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.
Unfortunately, activation email could not send to your email. Please try again.

Lexem Issue

Thread ID:

Created:

Updated:

Platform:

Replies:

114764 Dec 6,2013 10:43 AM Dec 19,2013 01:01 AM WPF 5
loading
Tags: Tools
Kevin Nichols
Asked On December 6, 2013 10:43 AM

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 11, 2013 11:41 PM

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.

Thanks, 
Karuppasamy P


LexemSampleDemo_a2fb211e.zip

Kevin Nichols
Replied On December 12, 2013 03:26 PM

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

So

"Hello" would be green

Hello would be black

 


Kevin Nichols
Replied On December 12, 2013 03:47 PM

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 04:10 PM

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.

hello"hello"hello[hello]hello

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

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

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

</syncfusion:FormatsCollection>

<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"/>

</syncfusion:LexemCollection>


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

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.

Thanks,
Karuppasamy P

CONFIRMATION

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.

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.

;