-<p>This example demonstrates the use of the <a href="https://documentation.devexpress.com/CoreLibraries/DevExpress.XtraRichEdit.Services.ISyntaxHighlightService.class">ISyntaxHighlightService</a> to display source code of this example in different colors and fonts according to the category of terms. To accomplish this, the text is parsed into tokens according to language syntax elements. The project uses DevExpress parsers for C# and VB, available in the <strong>DevExpress.CodeParser</strong> library. Resulting tokens are converted into <a href="https://documentation.devexpress.com/CoreLibraries/DevExpress.XtraRichEdit.API.Native.SyntaxHighlightToken.class">SyntaxHighlightToken</a> objects and format settings for different token types are specified. The <a href="https://documentation.devexpress.com/CoreLibraries/DevExpress.XtraRichEdit.API.Native.SubDocument.ApplySyntaxHighlight.method">DevExpress.XtraRichEdit.API.Native.SubDocument.ApplySyntaxHighlight</a> method applies formatting to document ranges corresponding to the tokens.</p><p>
0 commit comments