ToolBoxTab3.ListView Özellik
Alır veya gösteren bir değeri ayarlar olup olmadığını öğeleri belirli bir araç sekmesinde görünen liste görünümünde veya simge görünüm biçimi.
Ad alanı: EnvDTE90
Derleme: EnvDTE90 (EnvDTE90.dll içinde)
Sözdizimi
'Bildirim
Property ListView As Boolean
Get
Set
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)
Özellik Değeri
Tür: System.Boolean
true araç sekme olan liste görünümünde; Aksi takdirde, false.
Yüklenen
Açıklamalar
ListViewsekme tarafından sekmesini temelinde de geçerlidir ToolBox. Yani, başka bir simge görünümüne sahipken bir sekme liste görünümü sağlayabilirsiniz.
Liste ve simge görünümleri Windows Gezgini'nde benzerdir. Liste görünümünde, içeriğini araç metin açıklamalarını, birbiri ardına, sol tarafında bir simgeyle listelenir. Simge görünümünde her öğe yalnızca bir simge ile temsil edilir. Fare üzerinde çalışırken simgeyi Araç İpucu açıklaması elde edebilirsiniz.
Örnekler
Bu örnek değiştirir ListView Toolbox sekmesini özelliği Bu örnek, bir eklenti çalıştırma hakkında daha fazla bilgi için bkz: Nasıl Yapılır: derlemek ve otomasyon nesne modeli kod örnekleri çalıştırma.
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Public Sub OnConnection(ByVal application As Object, _
ByVal connectMode As ext_ConnectMode, ByVal addInInst As Object, _
ByRef custom As Array) Implements IDTExtensibility2.OnConnection
_applicationObject = CType(application, DTE2)
_addInInstance = CType(addInInst, AddIn)
ToolBoxListViewExample(_applicationObject)
End Sub
Sub ToolBoxListViewExample(ByVal dte As DTE2)
Dim tlBox As ToolBox
Dim tbxTabs As ToolBoxTabs
Dim tbxTab As ToolBoxTab3
Dim tbxItem As ToolBoxItem
' Before runiing this example, open a Windows Form project,
' and select Toolbox from the View menu.
Try
' Create an object reference to the IDE's ToolBox object and
' its tabs.
tlBox = CType(_applicationObject.Windows.Item _
(Constants.vsWindowKindToolbox).Object, ToolBox)
tbxTabs = tlBox.ToolBoxTabs
' Select the first ToolBox tab.
tbxTab = CType(tbxTabs.Item(3), ToolBoxTab2)
MsgBox(tbxTab.Name)
tbxTab.Activate()
tbxItem = tbxTab.ToolBoxItems.Item(1)
MsgBox("Toolbox item name: " & tbxItem.Name)
MsgBox("Turning Toolbox to List view...")
tbxTab.ListView = False
MsgBox("Turning Toolbox to Icon view...")
tbxTab.ListView = True
Catch ex As System.Exception
MsgBox("ERROR: " & ex.Message)
End Try
End Sub
using EnvDTE;
using EnvDTE80;
using EnvDTE90;
using System.Windows.Forms;
public void OnConnection(object application,
ext_ConnectMode connectMode, object addInInst, ref Array custom)
{
_applicationObject = (DTE2)application;
_addInInstance = (AddIn)addInInst;
ToolBoxListViewExample(_applicationObject);
}
public void ToolBoxListViewExample(DTE2 dte)
{
ToolBox tlBox;
ToolBoxTabs tbxTabs;
ToolBoxTab3 tbxTab;
ToolBoxItem tbxItem;
// Before running this example, open a Windows Form project
// and select Toolbox from the View menu.
try
{
//Create an object reference to the IDE's ToolBox object and
// its tabs.
tlBox = (ToolBox)_applicationObject.Windows.Item
(Constants.vsWindowKindToolbox).Object;
tbxTabs = tlBox.ToolBoxTabs;
// Select the first Toolbox tab.
tbxTab = (ToolBoxTab2)tbxTabs.Item(3);
MessageBox.Show(tbxTab.Name);
tbxItem = tbxTab.ToolBoxItems.Item(1);
MessageBox.Show("Toolbox item name: " + tbxItem.Name);
MessageBox.Show("Turning Toolbox to List view...");
tbxTab.ListView = false;
MessageBox.Show("Turning Toolbox to Icon view...");
tbxTab.ListView = true;
}
catch (Exception ex)
{
MessageBox.Show("ERROR: " + ex.Message);
}
}
.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üvenilir kod tarafından Kitaplıklar kullanma.