IExplorerNodeCollection.AddFolder Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new folder node and uses the specified delegate to create child nodes for the new folder node.
public:
Microsoft::VisualStudio::SharePoint::Explorer::IExplorerNode ^ AddFolder(System::String ^ text, System::Drawing::Image ^ folderIcon, Action<Microsoft::VisualStudio::SharePoint::Explorer::IExplorerNode ^> ^ createChildNodes);
public Microsoft.VisualStudio.SharePoint.Explorer.IExplorerNode AddFolder (string text, System.Drawing.Image folderIcon, Action<Microsoft.VisualStudio.SharePoint.Explorer.IExplorerNode> createChildNodes);
abstract member AddFolder : string * System.Drawing.Image * Action<Microsoft.VisualStudio.SharePoint.Explorer.IExplorerNode> -> Microsoft.VisualStudio.SharePoint.Explorer.IExplorerNode
Public Function AddFolder (text As String, folderIcon As Image, createChildNodes As Action(Of IExplorerNode)) As IExplorerNode
Parameters
- text
- String
The text to display with the new folder node.
- folderIcon
- Image
The icon to display with the new folder node.
- createChildNodes
- 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.
Returns
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.