ToolWindows.SolutionExplorer Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
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
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);
}