다음을 통해 공유


ProvideLanguageServiceAttribute.SingleCodeWindowOnly Property

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

Namespace:  Microsoft.VisualStudio.Shell
Assemblies:   Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
  Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)

Syntax

‘선언
Public Property SingleCodeWindowOnly As Boolean
    Get
    Set
‘사용 방법
Dim instance As ProvideLanguageServiceAttribute
Dim value As Boolean

value = instance.SingleCodeWindowOnly

instance.SingleCodeWindowOnly = value
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: 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

ProvideLanguageServiceAttribute Members

Microsoft.VisualStudio.Shell Namespace