Change color only for user defined function/class identifier

SyntaxEditor for WPF Forum

The latest build of this product (v21.1.2) was released 19 days ago, which was before this thread was created.
Posted 9 days ago by Vadim Tsedrik
Version: 21.1.2
Avatar

Hello,

could you help me to proceed with the following problem?

I need to change the color of the identifier of any user-defined functions and classes.

Thanks

Comments (1)

Posted 8 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

The way to override default syntax highlighting from a lexer in SyntaxEditor is to use classification tags.  You effectively make a new IClassificationType that is associated with an IHighlightingStyle in the style registry.  The style would have an alternate foreground color to be used for the text.  Then you make a tagger that applies that IClassificationType over various appropriate text ranges that should receive that alternate foreground color.  Some of our adornments-related samples show the concept of classification types.  The tricky part of the whole thing is knowing where those identifiers are, so that you can tag the text ranges.


Actipro Software Support

Add Comment

Please log in to a validated account to post comments.