ToolWindows.SolutionExplorer Özellik

Tanım

UIHierarchy Çözüm Gezgini temsil eden bir nesne alır.

public:
 property EnvDTE::UIHierarchy ^ SolutionExplorer { EnvDTE::UIHierarchy ^ get(); };
public:
 property EnvDTE::UIHierarchy ^ SolutionExplorer { EnvDTE::UIHierarchy ^ get(); };
[System.Runtime.InteropServices.DispId(8)]
public EnvDTE.UIHierarchy SolutionExplorer { [System.Runtime.InteropServices.DispId(8)] get; }
[<System.Runtime.InteropServices.DispId(8)>]
[<get: System.Runtime.InteropServices.DispId(8)>]
member this.SolutionExplorer : EnvDTE.UIHierarchy
Public ReadOnly Property SolutionExplorer As UIHierarchy

Özellik Değeri

UIHierarchy

Bir UIHierarchy nesnesi.

Öznitelikler

Örnekler

Bu örnek Çözüm Gezgini etkinleştirir, içindeki öğeleri seçer, içindeki öğe sayısını sayar ve görüntüler ve sonra kapatır. Visual StudioBu örneği çalıştırmadan önce tümleşik geliştirme ortamında (IDE) bir proje açın.

Imports EnvDTE  
Imports EnvDTE80  
Public Sub SolExplorerManip(ByVal dte As DTE2)  
    ' Open a project in Visual Studio, before running this example.  
    Dim solExplorer As UIHierarchy  
    solExplorer = dte.ToolWindows.SolutionExplorer  
    MsgBox("Activating Solution Explorer...")  
    solExplorer.Parent.Activate()  
    MsgBox("Seleting some items in Solution Explorer...")  
    solExplorer.SelectDown(vsUISelectionType.vsUISelectionTypeExtend, _  
    2)  
    MsgBox("The count of items in Solution Explorer is: "  _  
    & solExplorer.Parent.Collection.Count.ToString())  
    MsgBox("Closing Solution Explorer." & vbCr & _  
    "If you made changes you will be prompted to save.")  
    solExplorer.Parent.Close(vsSaveChanges.vsSaveChangesPrompt)  
End Sub  
using EnvDTE;  
using EnvDTE80;  
using System.Windows.Forms;  
public void SolExplorerManip(DTE2 dte)  
    {  
    // Open a project in Visual Studio, before running this example.  
    UIHierarchy solExplorer;  
    solExplorer = _applicationObject.ToolWindows.SolutionExplorer;  
    MessageBox.Show("Activating Solution Explorer...");  
    solExplorer.Parent.Activate();  
    MessageBox.Show("Seleting the first two items in   
Solution Explorer...");  
    solExplorer.SelectDown(vsUISelectionType.vsUISelectionTypeExtend,  
 2);  
    MessageBox.Show("The count of items in Solution Explorer is: "  
 + solExplorer.Parent.Collection.Count.ToString());  
    MessageBox.Show("Closing Solution Explorer." + "\n" +   
"If you made changes you will be prompted to save.");  
    solExplorer.Parent.Close(vsSaveChanges.vsSaveChangesPrompt);  
}  

Şunlara uygulanır