ToolBoxTab.ToolBoxItems 屬性

取得與 ToolBoxTab 相關聯的 ToolBoxItems 集合。

命名空間:  EnvDTE
組件:  EnvDTE (在 EnvDTE.dll 中)

語法

'宣告
ReadOnly Property ToolBoxItems As ToolBoxItems
ToolBoxItems ToolBoxItems { get; }
property ToolBoxItems^ ToolBoxItems {
    ToolBoxItems^ get ();
}
abstract ToolBoxItems : ToolBoxItems
function get ToolBoxItems () : ToolBoxItems

屬性值

型別:EnvDTE.ToolBoxItems
ToolBoxItems 集合。

備註

ToolBoxTab 可以包含一或多個 ToolBoxItem 物件。

範例

Sub ToolBoxAddExample()
    ' This adds a Text item to the first tab 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.
    tbxTabs.Item(1).ToolBoxItems.Add("New Text Item", "Some text to _
    add to the document.", vsToolBoxItemFormat.vsToolBoxItemFormatText)
End Sub

.NET Framework 安全性

請參閱

參考

ToolBoxTab 介面

EnvDTE 命名空間