IndentingStyle Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents the different indenting styles supported by language services.
public enum class IndentingStyle
public enum class IndentingStyle
enum IndentingStyle
public enum IndentingStyle
type IndentingStyle =
Public Enum IndentingStyle
- Inheritance
-
IndentingStyle
Fields
Name | Value | Description |
---|---|---|
None | 0 | Pressing Enter inserts a new line and causes the caret to always move to the beginning of the new line. |
Block | 1 | 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. |
Smart | 2 | 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.