IndentingStyle Enum

Definition

Represents the different indenting styles supported by language services.

public enum IndentingStyle
Inheritance
IndentingStyle

Fields

Block

Pressing Enter inserts a new line and causes the caret to move to the same position as the first non-whitespace character on the previous line.

None

Pressing Enter inserts a new line and causes the caret to always move to the beginning of the new line.

Smart

Pressing Enter inserts a new line and causes the caret to either move to the same position as the first non-whitespace character on the previous line or to indent or outdent automatically depending on the character at the end of the previous line. For example, in C#, pressing Enter after a "{" causes a new line to be inserted and cursor to be indented properly. In addition, the "{" may be moved to its own line. If Enter is pressed after a "}", however, a new line is entered and the caret is moved out one level of indentation.

Remarks

These styles correspond to the three indenting options available for languages in Visual Studio. These values are returned from the IndentStyle property on the LanguagePreferences object.