Compartir a través de


ToolBoxTab.ListView Property

Definition

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

public:
 property bool ListView { bool get(); void set(bool value); };
public:
 property bool ListView { bool get(); void set(bool value); };
[System.Runtime.InteropServices.DispId(8)]
public bool ListView { [System.Runtime.InteropServices.DispId(8)] get; [System.Runtime.InteropServices.DispId(8)] set; }
[<System.Runtime.InteropServices.DispId(8)>]
[<get: System.Runtime.InteropServices.DispId(8)>]
[<set: System.Runtime.InteropServices.DispId(8)>]
member this.ListView : bool with get, set
Public Property ListView As Boolean

Property Value

true if the ToolBox tab is in List view; otherwise, false.

Attributes

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  

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.

Applies to