Partager via


IVsUIHierarchyWindow.ExpandItem Method

Controls the state or appearance of items in the hierarchy.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Déclaration
Function ExpandItem ( _
    pUIH As IVsUIHierarchy, _
    itemid As UInteger, _
    expf As EXPANDFLAGS _
) As Integer
'Utilisation
Dim instance As IVsUIHierarchyWindow
Dim pUIH As IVsUIHierarchy
Dim itemid As UInteger
Dim expf As EXPANDFLAGS
Dim returnValue As Integer

returnValue = instance.ExpandItem(pUIH, _
    itemid, expf)
int ExpandItem(
    IVsUIHierarchy pUIH,
    uint itemid,
    EXPANDFLAGS expf
)
int ExpandItem(
    [InAttribute] IVsUIHierarchy^ pUIH, 
    [InAttribute] unsigned int itemid, 
    [InAttribute] EXPANDFLAGS expf
)
abstract ExpandItem : 
        pUIH:IVsUIHierarchy * 
        itemid:uint32 * 
        expf:EXPANDFLAGS -> int 
function ExpandItem(
    pUIH : IVsUIHierarchy, 
    itemid : uint, 
    expf : EXPANDFLAGS
) : int

Parameters

  • itemid
    Type: System.UInt32
    [in] Identifier of the item in the hierarchy. To change the appearance of the hierarchy itself, set itemid to VSITEMID_ROOT. For a list of itemid values, see VSITEMID.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsUIHierarchyWindow::ExpandItem(
   [in] IVsUIHierarchy* pUIH,
   [in] VSITEMID itemid,
   [in] EXPANDFLAGS expf
);

Use this method to expand, collapse, bold, or highlight specific items or the hierarchy root itself. Use GetItemState to retrieve the state of the hierarchy set by the ExpandItem method.

.NET Framework Security

See Also

Reference

IVsUIHierarchyWindow Interface

IVsUIHierarchyWindow Members

Microsoft.VisualStudio.Shell.Interop Namespace