Compartir a través de


ProvideLanguageServiceAttribute.SingleCodeWindowOnly Property

Determines if the Window -> New Window command is disabled for a language service.

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

Syntax

'Declaración
Public Property SingleCodeWindowOnly As Boolean
public bool SingleCodeWindowOnly { get; set; }

Property Value

Type: System.Boolean
Returns true if the Window -> New Window command is disabled; otherwise, returns false.

Remarks

The Window -> New Window command opens another window in the current edit window. Any changes made in this additional window are reflected in the original window (and all other duplicate windows on the same source file). If a language service cannot support multiple edit windows with the same source file, then the SingleCodeWindowOnly property should be set to true.

This property is available to any language service implementation.

The default is false indicating multiple windows on the same source file are supported.

The registry entry looks like this:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\[X.Y]\Languages\Language Services\
  [Language Name]\
    Single Code Window Only = reg_dword: 0x00000001

Examples

    [ProvideLanguageService(typeof(MyLanguageService),           // Required
                            MyConstants.languageName,            // Required
                            MyConstants.languageNameResourceID,  // Required
        // Optional language service properties
        SingleCodeWindowOnly = true,  // disable New Window command
                           )]

.NET Framework Security

See Also

Reference

ProvideLanguageServiceAttribute Class

Microsoft.VisualStudio.Shell Namespace