Set text foreground for verbatim strings

SyntaxEditor .NET Languages Add-on for WPF Forum

Posted 8 years ago by Sean Beanland
Version: 15.1
Avatar

We specify the color for regular string values between two quotes. However, I haven't been able to find a way to set the forground for verbatim string literals, where the '@' simple precedes the string quotes.

In the below image, we set the text color to the light blue you see. I'm trying to set the second line, with the dark red text, to the same light blue. Is this possible?

http://imgur.com/0lElex1

Comments (2)

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

Hi Sean,

Yes, you can set the color for that too but note that verbatim strings use a different classification type than normal strings.  So you'd have to update the style for that classification type too (DotNetClassificationTypeProvider.CSharpVerbatimString).


Actipro Software Support

Posted 8 years ago by Sean Beanland
Avatar

Ah that did it. Thanks for pointing me to the right ClassificationTypeProvider!

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.