softend:software:fastcolortextbox:start

FastColorTextBox

Syntax Highlight Beispiel

FontStyle style = FontStyle.Regular;
TextStyle blue = new TextStyle(Brushes.LightBlue, null, style);
TextStyle red = new TextStyle(Brushes.Red, null, style);
TextStyle green = new TextStyle(Brushes.Green, null, style);

void textBox_TextChanged(object sender, TextChangedEventArgs e)
{
    e.ChangedRange.ClearStyle(blue, red, green);
    e.ChangedRange.SetStyle(blue, "<.*?>");
    e.ChangedRange.SetStyle(red, "{{(?!!)(?!GUID).*?}}");
    e.ChangedRange.SetStyle(green, "{{! .*? }}");
}
  • softend/software/fastcolortextbox/start.txt
  • Zuletzt geändert: 2019/05/02 17:26
  • von 127.0.0.1