Skip to content

Need some help with custom highlighting #311

Answered by siegfriedpammer
imcleo asked this question in Q&A
Discussion options

You must be logged in to vote

// Load our custom highlighting definition
IHighlightingDefinition customHighlighting;
using (Stream s = typeof(Window1).Assembly.GetManifestResourceStream("AvalonEdit.Sample.CustomHighlighting.xshd")) {
if (s == null)
throw new InvalidOperationException("Could not find embedded resource");
using (XmlReader reader = new XmlTextReader(s)) {
customHighlighting = ICSharpCode.AvalonEdit.Highlighting.Xshd.
HighlightingLoader.Load(reader, HighlightingManager.Instance);
}
}
// and register it in the HighlightingManager
HighlightingManager.Instance.R…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@imcleo
Comment options

@siegfriedpammer
Comment options

Answer selected by imcleo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants