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.StringThe text to display with the new folder node.
folderIcon
Type: System.Drawing.ImageThe icon 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.