Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ToolBoxTab.ListView Property

Gets or sets a value indicating whether items in a particular ToolBox tab display in List view or Icon view format.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)
bool ListView { get; set; }

Property Value

Type: System.Boolean
true if the ToolBox tab is in List view; otherwise, false.

ListView applies on a tab-by-tab basis in the ToolBox. That is, one tab can have List view while another has Icon view.

The List and Icon views are similar to those in Windows Explorer. In List view, the contents of the Toolbox are listed as text descriptions, one after another, with an icon on the left side. In Icon view, each item is represented only by an icon. You can get a tool tip description of the icon by moving over it with the mouse arrow.

Sub ListViewExample()
    ' This toggles the view of the Toolbox.
    ' Define the variables and create an object reference to the IDE's  
    ' ToolBox object.
    Dim win As Window = DTE.Windows.Item(Constants.vsWindowKindToolbox)
    Dim tlBox As ToolBox = win.Object
    Dim tbxTabs As ToolBoxTabs

    ' Create an object reference to the ToolBoxTabs object.
    tbxTabs = tlBox.ToolBoxTabs

    ' Add a new Text item to the first tab in the Toolbox.
    MsgBox("Turning Toolbox to List view...")
    tbxTabs.Item(1).ListView = False
    MsgBox("Turning Toolbox to Icon view...")
    tbxTabs.Item(1).ListView = True
End Sub
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.