I am hosting the ICSharpCode AvalonEdit source-code editing WPF control into my Windows Forms C# application. I know that the following code loads a syntax highlighting definition:
ICSharpCode.AvalonEdit.TextEditor MyEditor = new ICSharpCode.AvalonEdit.TextEditor();
MyEditor.ShowLineNumbers = true;
Stream xshd_stream = File.OpenRead("C:\\Syntax Highlighting\\php.xsdh");
XmlTextReader xshd_reader = new XmlTextReader(xshd_stream);
// Apply the new syntax highlighting definition.
MyEditor.SyntaxHighlighting = ICSharpCode.AvalonEdit.Highlighting.Xshd.HighlightingLoader.Load(
xshd_reader, ICSharpCode.AvalonEdit.Highlighting.HighlightingManager.Instance
);
xshd_reader.Close();
xshd_stream.Close();
But what if, after I have already set a syntax highlighting definition, I don't want any syntax highlighting, and I just want it to display it as plain text? How can I disable syntax highlighting in the AvalonEdit control?