Partilhar via


UIHierarchyItem Interface

Definition

Represents an item that shows hierarchical tree data, such as Solution Explorer, in a standard tool window in the integrated development environment (IDE).

public interface class UIHierarchyItem
public interface class UIHierarchyItem
__interface UIHierarchyItem
[System.Runtime.InteropServices.Guid("FBD0D024-09CD-4D9F-9E2B-CACD628426A5")]
[System.Runtime.InteropServices.TypeLibType(4160)]
public interface UIHierarchyItem
[System.Runtime.InteropServices.Guid("FBD0D024-09CD-4D9F-9E2B-CACD628426A5")]
public interface UIHierarchyItem
[<System.Runtime.InteropServices.Guid("FBD0D024-09CD-4D9F-9E2B-CACD628426A5")>]
[<System.Runtime.InteropServices.TypeLibType(4160)>]
type UIHierarchyItem = interface
[<System.Runtime.InteropServices.Guid("FBD0D024-09CD-4D9F-9E2B-CACD628426A5")>]
type UIHierarchyItem = interface
Public Interface UIHierarchyItem
Attributes

Examples

Sub UIHierarchyItemExample()  
   'Reference the UIHierarchy, UIHierarchyItem, and OutputWindow objects.  
   Dim UIH As UIHierarchy = _  
     DTE.Windows.Item(Constants.vsWindowKindMacroExplorer).Object  
   Dim samples As UIHierarchyItem = UIH.GetItem("Macros\Samples")  
   Dim OWPane As OutputWindowPane = GetOutputWindowPane("List Macros")  
   Dim file As UIHierarchyItem  

   OWPane.Clear()  
   For Each file In samples.UIHierarchyItems  
      OWPane.OutputString(file.Name & _  
        Microsoft.VisualBasic.Constants.vbCrLf)  
      Dim macro As UIHierarchyItem  
      For Each macro In file.UIHierarchyItems  
         OWPane.OutputString("   " & macro.Name & _  
           Microsoft.VisualBasic.Constants.vbCrLf)  
      Next  
   Next  
End Sub  

Function GetOutputWindowPane(ByVal Name As String, Optional ByVal show _  
  As Boolean = True) As OutputWindowPane  
   Dim win As Window = _  
     DTE.Windows.Item(EnvDTE.Constants.vsWindowKindOutput)  
   If show Then win.Visible = True  
   Dim ow As OutputWindow = win.Object  
   Dim owpane As OutputWindowPane  
   Try  
      owpane = ow.OutputWindowPanes.Item(Name)  
   Catch e As System.Exception  
      owpane = ow.OutputWindowPanes.Add(Name)  
   End Try  
   owpane.Activate()  
   Return owpane  
End Function  

Properties

Collection

Gets the collection containing the UIHierarchyItem object supporting this property.

DTE

Gets the top-level extensibility object.

IsSelected

Gets whether a node is selected.

Name

Gets the name of the object.

Object

Gets an object that can be accessed by name at run time.

UIHierarchyItems

Gets a collection representing children of the item.

Methods

Select(vsUISelectionType)

Causes the specified item to become active in the user interface.

Applies to