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)

Syntax

'Declaration
Property ListView As Boolean
bool ListView { get; set; }
property bool ListView {
    bool get ();
    void set (bool value);
}
abstract ListView : bool with get, set
function get ListView () : boolean
function set ListView (value : boolean)

Property Value

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

Remarks

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.

Examples

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

.NET Framework Security

See Also

Reference

ToolBoxTab Interface

EnvDTE Namespace