Condividi tramite


Proprietà UIHierarchyItems.Expanded

Ottiene o imposta un valore che indica se un nodo della gerarchia è espanso.

Spazio dei nomi:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Sintassi

'Dichiarazione
Property Expanded As Boolean
    Get
    Set
bool Expanded { get; set; }
property bool Expanded {
    bool get ();
    void set (bool value);
}
abstract Expanded : bool with get, set
function get Expanded () : boolean
function set Expanded (value : boolean)

Valore proprietà

Tipo: System.Boolean
Valore booleano true se se il nodo è espanso, false in caso contrario.

Esempi

Sub ExpandedExample()
   Dim UIH As UIHierarchy = _
     DTE.Windows.Item(Constants.vsWindowKindMacroExplorer).Object
   Dim UIHItem As UIHierarchyItem = UIH.GetItem("Macros\Samples")

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

Sicurezza di .NET Framework

Vedere anche

Riferimenti

UIHierarchyItems Interfaccia

Spazio dei nomi EnvDTE

Altre risorse

Procedura: modificare le visualizzazioni ad albero mediante UIHierarchy