다음을 통해 공유


ProvideLanguageServiceAttribute.ShowDropDownOptions Property

Definition

Determines if the Navigation bar option is enabled in the Options dialog box.

public:
 property bool ShowDropDownOptions { bool get(); void set(bool value); };
public:
 property bool ShowDropDownOptions { bool get(); void set(bool value); };
public bool ShowDropDownOptions { get; set; }
member this.ShowDropDownOptions : bool with get, set
Public Property ShowDropDownOptions As Boolean

Property Value

Returns true if the Navigation bar option is to be enabled; otherwise, returns false.

Examples

[ProvideLanguageService(typeof(MyLanguageService),           // Required  
                        MyConstants.languageName,            // Required  
                        MyConstants.languageNameResourceID,  // Required  
    // Optional language service properties  
    ShowDropDownOptions = true,  // drop down bar options are supported  
                       )]  

Remarks

The navigation bar appears across the top of an editor window and allows for quick navigation to various elements in the file. Typically, the navigation bar contains two combo-boxes, one for types, and the other for members. Selecting a type or member immediately moves that type or member into the edit window. The navigation bar can be shown or hidden for each language using the Navigation bar option in the Options dialog box (available from the Tools -> Options menu). If a language service supports the navigation bar then it should set the ShowDropDownOptions property to true. If the registry entry is not defined at all, then the Navigation bar option in the Options dialog box is disabled and cannot be changed. Otherwise, the value of the registry entry controls whether the Navigation bar option is initially selected or not.

This property is available for any language service implementation.

The default is false, indicating the Navigation bar option is not selected (actually, unless this property is explicitly set to true or false, the registry entry is not created and therefore the Navigation bar option is disabled).

The registry entry looks like this:

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

Applies to