public Span _getSyntaxSpan(string word, SyntaxHighlighter.SyntaxType style) { #region ApplySpanStyle Span s = new Span(new Run(word)); switch (style) { case SyntaxHighlighter.SyntaxType.Operation: s.Foreground = new SolidColorBrush(Colors.Blue); s.FontWeight = FontWeights.Bold; break; case SyntaxHighlighter.SyntaxType.Comment: s.Foreground = new SolidColorBrush(Colors.DarkGray); break; case SyntaxHighlighter.SyntaxType.Number: s.Foreground = new SolidColorBrush(Colors.Orange); break; case SyntaxHighlighter.SyntaxType.Register: s.Foreground = new SolidColorBrush(Colors.Green); s.FontWeight = FontWeights.Bold; break; case SyntaxHighlighter.SyntaxType.PlainText: // Do Nothing break; } return(s); #endregion }
public SyntaxTag(TextPointer s, TextPointer e, SyntaxHighlighter.SyntaxType t) { start = s; end = e; type = t; }