Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

UIHierarchyItems.Expanded Property

Sets or gets whether a node in the hierarchy is expanded.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

bool Expanded { get; set; }

Property Value

Type: System.Boolean
A Boolean value indicating true the node is expanded, false if not.

Sub ExpandedExample()
   Dim UIH As UIHierarchy = _
   Dim UIHItem As UIHierarchyItem = UIH.GetItem("Macros\Samples")

   If UIHItem.IsSelected = False Then
      If UIH.UIHierarchyItems.Expanded = True Then
         MsgBox("Node is expanded.")
         MsgBox("Node is not expanded.")
      End If
   End If
   UIH.SelectDown(vsUISelectionType.vsUISelectionTypeSelect, 2)
   UIH.SelectDown(vsUISelectionType.vsUISelectionTypeSelect, 1)
   UIH.SelectUp(vsUISelectionType.vsUISelectionTypeExtend, 1)
End Sub

© 2015 Microsoft