Freigeben über


ProvideLanguageServiceAttribute.SingleCodeWindowOnly Property

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

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

Syntax

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

Property Value

Type: 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