ProvideLanguageServiceAttribute.ShowSmartIndent Property

Determines if the Smart Indenting option is enabled in the Options dialog box.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
Public Property ShowSmartIndent As Boolean
public bool ShowSmartIndent { get; set; }
public:
property bool ShowSmartIndent {
    bool get ();
    void set (bool value);
}
member ShowSmartIndent : bool with get, set
function get ShowSmartIndent () : boolean 
function set ShowSmartIndent (value : boolean)

Property Value

Type: Boolean
Returns true if the Smart Indenting option is enabled; otherwise, returns false.

Remarks

There are three basic styles of indenting control: None, Block, and Smart. Each controls the behavior of indenting when a new line is typed in the source code. These three options are selectable in the Options dialog box (available under the Tools -> Options menu), typically under the Tabs property page for each language. If the ShowSmartIndent property is set to true, then the indenting option for Smart can be changed. This also indicates that the language service supports smart indenting. Visual Studio can support the None and Block modes without knowing the language being edited, but the Smart indenting option requires knowledge of the language to set the proper indentation levels.

This property is available to any language service implementation.

The default is false indicating the Smart indent option is disabled.

The registry entry looks like this:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\[X.Y]\Languages\Language Services\
  [Language Name]\
    ShowSmartIndent = reg_dword: 0x00000001

Examples

    [ProvideLanguageService(typeof(MyLanguageService),           // Required
                            MyConstants.languageName,            // Required
                            MyConstants.languageNameResourceID,  // Required
        // Optional language service properties
        ShowSmartIndent = true,  // enable indent options
                           )]

.NET Framework Security

See Also

Reference

ProvideLanguageServiceAttribute Class

Microsoft.VisualStudio.Shell Namespace