ProvideLanguageServiceAttribute.SingleCodeWindowOnly ProvideLanguageServiceAttribute.SingleCodeWindowOnly ProvideLanguageServiceAttribute.SingleCodeWindowOnly Property


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

public bool SingleCodeWindowOnly { get; set; }
member this.SingleCodeWindowOnly : bool with get, set
Public Property SingleCodeWindowOnly As Boolean
Property Value

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


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


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  

Applies to