TypeAndMemberDropdownBars Class

Provides support for the combo boxes showing type and member information as offered by a language service.

This API is not CLS-compliant. 


Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)

public abstract class TypeAndMemberDropdownBars : IVsDropdownBarClient

The TypeAndMemberDropdownBars type exposes the following members.

Protected methodTypeAndMemberDropdownBarsInitializes a new instance of the TypeAndMemberDropdownBars class.

Public methodDoneCleans up any allocated resources just before the TypeAndMemberDropdownBars object is destroyed.
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetComboAttributesReturns information about the specified combo box.
Public methodGetComboTipTextReturns text to be shown in a tool tip when the cursor is held over the combo box.
Public methodGetEntryAttributesReturns the font attributes for the specified entry on the specified combo box.
Public methodGetEntryImageReturns the glyph index for the specified entry on the specified combo box.
Public methodGetEntryTextReturns the text to be displayed for the specified entry in the specified combo box.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetMemberReturns the specified entry for the specified combo box.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodOnComboGetFocusCalled when a combo box gets the focus.
Public methodOnItemChosenCalled when an item is chosen from the specified combo box.
Public methodOnItemSelectedCalled when an entry is highlighted in one of the combo boxes.
Public methodOnSynchronizeDropdownsCalled to fill and synchronize all combo boxes.
Public methodSetDropdownBarCalled to specify the IVsDropdownBar object that controls the two combo boxes.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

This class is used to manage the combo boxes showing type and member information for a particular source file. These combo boxes appear in a drop-down bar (represented by an IVsDropdownBar interface) at the top of the editor view showing the source file. This class contains all the information required for Visual Studio to show and manage those combo boxes. In addition, this class contains event handlers that are called when the combo boxes are accessed by the user.


SynchronizeDropdowns is a method that is marked as internal and is called from the base CodeWindowManager class. This internal method is given an IVsTextView object when the base AddAdornments method on the CodeWindowManager class is called. The IVsTextView object is used to update the display when an item is chosen in a combo box. The SynchronizeDropdowns method is also called from the base method SynchronizeDropdowns in the LanguageService class.

Notes to Implementers

If you plan to support the type and member combo boxes, you must derive a class from the TypeAndMemberDropdownBars class and return an instance of your class from the CreateDropDownHelper method in your version of the LanguageService class. In addition, you must implement the OnSynchronizeDropdowns method which handles the task of filling the internal lists to be shown in the combo boxes.

Notes to Callers

An instance of your version of a TypeAndMemberDropdownBars object is returned from a call to CreateDropDownHelper in the LanguageService class. If CreateDropDownHelper returns a valid object, Visual Studio creates and manages the combo boxes for you, using information from your version of the TypeAndMemberDropdownBars class.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.