ToolBoxItems.SelectedItem Özellik
Sekmesinde seçili öğeyi alır araç, herhangi varsa.
Ad alanı: EnvDTE
Derleme: EnvDTE (EnvDTE.dll içinde)
Sözdizimi
'Bildirim
ReadOnly Property SelectedItem As ToolBoxItem
ToolBoxItem SelectedItem { get; }
property ToolBoxItem^ SelectedItem {
ToolBoxItem^ get ();
}
abstract SelectedItem : ToolBoxItem
function get SelectedItem () : ToolBoxItem
Özellik Değeri
Tür: EnvDTE.ToolBoxItem
ToolBoxItem nesnesi
Notlar
Hiçbir öğe varsa araç sekme ya da seçili öğe yok, daha sonra SelectedItem döndüren Nothing.
Örnekler
Sub SelectedItemExample(ByVal dte As DTE2)
' Before running this example, select an item in the
' ToolBox window.
Dim tab As ToolBoxTab = dte.ToolWindows.ToolBox.ActiveTab
Dim item As ToolBoxItem = tab.ToolBoxItems.SelectedItem
If IsNothing(tab) = False Then
MsgBox("The selected toolbox item is " & item.Name)
Else
MsgBox("No toolbox item is selected")
End If
End Sub
public void SelectedItemExample(DTE2 dte)
{
// Before running this example, select an item in the
// ToolBox window.
ToolBoxTab tab = dte.ToolWindows.ToolBox.ActiveTab;
ToolBoxItem item = tab.ToolBoxItems.SelectedItem;
if (tab != null)
MessageBox.Show("The selected toolbox item is " + item.Name);
else
MessageBox.Show("No toolbox item is selected");
}
.NET Framework Güvenliği
- Anında arayanlar için tam güven. Bu üye kısmen güvenilen kodla kullanılamaz. Daha fazla bilgi için bkz. Kısmen güvenilen kod kitaplıklarını kullanma.