The highlight color for snippets is the same on Metro White and Metro Dark (which makes it unreadable on Metro Dark). You can quickly verify this using the sample browser.
The highlight color for snippets is the same on Metro White and Metro Dark (which makes it unreadable on Metro Dark). You can quickly verify this using the sample browser.
Hi Mike,
Thanks for letting us know about that. Our Dark.vssettings file (in the sample project) was missing entries for the two code snippet options. We're making updates for the next build that will handle this.
In the meantime, you can get the two highlighting styles directly with and then change them yourself:
var style1 = AmbientHighlightingStyleRegistry.Instance[DisplayItemClassificationTypes.CodeSnippetField];
var style2 = AmbientHighlightingStyleRegistry.Instance[DisplayItemClassificationTypes.CodeSnippetDependentField];
Hi
I see the marked variables in the inserted snippets are not readable. I change according to the theme background colors, text colors and the user adjustable colors.
Is there in the mean time an easy way to correct/adjust this code snippet UI colors or when can i change the registry to make this work?
[Modified 5 years ago]
Hi Martin,
The highlighting styles for the two special display item classification types mentioned above can be set in AmbientHighlightingStyleRegistry. Those govern the appearance of the inserted snippet fields. Have you tried customizing those yet?
If you can't sort it out, perhaps write our support address with a screenshot of what you see that you want changed, and tell us any related code you're trying in terms of customizing the highlighting style registry. Please reference this thread in your e-mail.
I fixed the backgrounds like this:
var uiProv = new SyntaxEditor.DisplayItemClassificationTypeProvider(AmbientHighlightingStyleRegistry.Instance);
var snfield = AmbientHighlightingStyleRegistry.Instance[uiProv.CodeSnippetField];
snfield.Background = csColor;
snfield = AmbientHighlightingStyleRegistry.Instance[uiProv.CodeSnippetDependentField];
snfield.Background = csColor;
But the text colors i can not change. Is not that important:)
Hi Martin,
Ahh, yes it will use the syntax highlighting for the text foreground. I'd recommend using a "CodeSnippetField" background color closer to your editor background color if it conflicts with syntax-highlighted text foregrounds.
Please log in to a validated account to post comments.