This topic provides information about indenting and outdenting text block as well as text formatting, which is based on rules defined by the language as well as the default (and optionally custom) IndentServiceProvider registered on the Language.
The following topics are prerequisites to understanding this topic:
This topic contains the following sections:
The xamSyntaxEditor™ supports the indenting/outdenting of text blocks as well as automatic indenting/outdenting applied by the default (and optionally custom) IndentServiceProvider
registered by the Language.
The user may indent/outdent selected text while editing a document using the following key combination:
You can use the following TextDocument methods to indent and outdent a specified range of contiguous lines.
Automatic indentation is based on The default (or optionally custom) IndentServiceProvider registered on the language. The indentation occurs automatically while editing text.
The screenshot below shows how the caret is automatically indented when the user presses the Enter key after a curly open braces, when the language is set to CSharpLanguage:
The following topics provide additional information related to this topic.