This topic provides information about text colorization, based on the TextDocument’s associated language.
The following topics are prerequisites to understanding this topic:
The xamSyntaxEditor™ supports syntax highlighting, which are visual cues for interpreting the text shown in the editor. Interpreting the manner in which various parts of the text is a function of the language set in the Language property of the TextDocument
. The syntax-highlighting feature uses text colorization for different text parts (for example. comments, keywords, etc …). Errors are rendered highlighted and with squiggly underlines to help identify text that is not complying within the language syntax rules.
There are several predefined languages supported in the TextDocument
assembly:
The following screenshot shows the xamSyntaxEditor control displaying C# code with syntax highlighting applied based on the C# language:
The following topics provide additional information related to this topic.