<syncfusion:FormatsCollection x:Key="JSONLanguageFormats">
<syncfusion:EditFormats Foreground="Black" FormatName="OperatorFormat"/>
<syncfusion:EditFormats Foreground="Blue" FormatName="LiteralsFormat"/>
</syncfusion:FormatsCollection>
<syncfusion:LexemCollection x:Key="JSONLanguageLexems">
<syncfusion:Lexem StartText=""" EndText=""" IsMultiline="False" LexemType="Literals" FormatName="LiteralsFormat"/>
<syncfusion:Lexem StartText=":" ContainsEndText="False" IsMultiline="False" LexemType="Operator" FormatName="OperatorFormat"/>
</syncfusion:LexemCollection> |
new Lexem { StartText = @"(?<=([\'\""]))(?=:)", IsRegex=true, IsMultiline = false, ContainsEndText = false, LexemType = EditTokenType.Keyword, FormatName= "AfterColon" }, |
Hi,
I came across this post and have same situation with EditControl + Json. This post helps but I also want to have Outlining support on the Json string, How can I make it work.
I already set the SupportsOutlning= true for the custom Json lanugage that use with this sample.
Thanks,
Hi Michael,
Sorry for the delay.
You can achieve your requirement by adding the lexem with CodeSnippet type and implementing the custom expand-collapse logic using the ApplyExpandCollapse override method available in the custom language class.
Please refer the sample for your reference.
Regards,
Gokul T