Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

SubDocument.ApplySyntaxHighlight(List<SyntaxHighlightToken>) Method

Performs a batch update of text formatting for document ranges corresponding to specified tokens.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v20.2.Core.dll

NuGet Package: DevExpress.RichEdit.Core

Declaration

void ApplySyntaxHighlight(
    List<SyntaxHighlightToken> tokens
)

Parameters

Name Type Description
tokens List<SyntaxHighlightToken>

A List<T><SyntaxHighlightToken,> collection containing tokens to apply, ordered by the SyntaxHighlightToken.Start value.

Remarks

Call the SubDocument.ApplySyntaxHighlight method within the ISyntaxHighlightService.Execute() method to enable syntax highlighting.

Refer to the How to: Highlight Document Syntax example (or How to: Highlight Document Syntax for WPF) for information on how to obtain the collection of SyntaxHighlightToken objects.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ApplySyntaxHighlight(List<SyntaxHighlightToken>) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also