Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
190
Highlight single Token from Code
posted

Hi,

is there a way to Highlight a single Token in the XamSyntaxEditor?

I have to perform a Min- Max-Limit check for a Token where the Limits are only known after starting the Program. Thus I am looking for a way to find all Tokens I need to check and Highlight them (overriding the Language style) if they are out of bounds.

The best would be if I could somehow use the Syntaxerror reporting.

Thus far I was able to find the Tokens and check the values, but I don't know how to Highlight them to show the User that he has entered a not valid value.

Regards

Thomas Stüven

Parents
No Data
Reply
  • 34430
    Offline posted

    Hello Thomas,

    There currently does not exist a way to highlight a single token in the XamSyntaxEditor control that I am personally aware of. I am currently checking with our senior development staff to be certain, but I believe that the text placed in the editor pulls its color purely from the Language style supported by the ClassificationAppearanceMap in this case.

    While I don't entirely understand your scenario in this case, I have to wonder if a XamSyntaxEditor is really your best bet here, or whether you would want something more along the lines of a XamRichTextEditor, as this would allow you to highlight a particular "node." You can read further about the XamRichTextEditor at the following online documentation article: https://www.infragistics.com/help/wpf/xamrichtexteditor.

    If you would like to see single-node highlighting added to the XamSyntaxEditor control, I would recommend suggesting a new product idea for this feature at http://ideas.infragistics.com. This product ideas site places you in direct communication with our product management teams who plan and prioritize upcoming features and development based on community and user feedback.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer

Children