Partager via


IExplorerNodeCollection.AddFolder Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Creates a new folder node and uses the specified delegate to create child nodes for the new folder node.

Namespace:  Microsoft.VisualStudio.SharePoint.Explorer
Assembly:  Microsoft.VisualStudio.SharePoint (in Microsoft.VisualStudio.SharePoint.dll)

Syntax

'Declaration
Function AddFolder ( _
    text As String, _
    folderIcon As Image, _
    createChildNodes As Action(Of IExplorerNode) _
) As IExplorerNode
IExplorerNode AddFolder(
    string text,
    Image folderIcon,
    Action<IExplorerNode> createChildNodes
)

Parameters

  • text
    Type: System.String

    The text to display with the new folder node.

  • createChildNodes
    Type: System.Action<IExplorerNode>

    The delegate to execute to create child nodes for the new folder node. This delegate is executed automatically when the NodeChildrenRequested event for the new folder node is raised.

Return Value

Type: Microsoft.VisualStudio.SharePoint.Explorer.IExplorerNode
The new folder node.

Remarks

When you use the AddFolder method to create a folder node, you can pass an Action<T> delegate that will be called automatically to create the child nodes for the new folder node. The parameter of this delegate is a IExplorerNode object that represents the folder node to which you can add children. For a walkthrough that demonstrates how to specify a delegate when you create a folder node, see Walkthrough: Extending Server Explorer to Display Web Parts.

.NET Framework Security

See Also

Reference

IExplorerNodeCollection Interface

Microsoft.VisualStudio.SharePoint.Explorer Namespace