Set text foreground for verbatim strings

SyntaxEditor .NET Languages Add-on for WPF Forum

Posted 8 years ago by Sean Beanland
Version: 15.1

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?

Comments (2)

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

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

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

The latest build of this product (v24.1.2) 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.