IExplorerNodeCollection.AddFolder 方法
建立新的資料夾節點,並使用指定的委派來為新的資料夾節點建立子節點。
命名空間: Microsoft.VisualStudio.SharePoint.Explorer
組件: Microsoft.VisualStudio.SharePoint (在 Microsoft.VisualStudio.SharePoint.dll 中)
語法
'宣告
Function AddFolder ( _
text As String, _
folderIcon As Image, _
createChildNodes As Action(Of IExplorerNode) _
) As IExplorerNode
IExplorerNode AddFolder(
string text,
Image folderIcon,
Action<IExplorerNode> createChildNodes
)
參數
- text
型別:System.String
隨新資料夾節點顯示的文字。
- folderIcon
型別:System.Drawing.Image
隨新資料夾節點顯示的圖示。
- createChildNodes
型別:System.Action<IExplorerNode>
為新資料夾節點建立子節點時要執行的委派。引發新資料夾節點的 NodeChildrenRequested 事件時,自動執行此委派。
傳回值
型別:Microsoft.VisualStudio.SharePoint.Explorer.IExplorerNode
新的資料夾節點。
備註
當您使用 AddFolder 方法來建立資料夾節點時,您可以傳遞將會自動呼叫來建立新資料夾節點的子節點其 Action<T> 委派。 這個委派的參數是 IExplorerNode 物件,代表您可以新增子系的資料夾節點。 如需示範如何在建立資料夾節點時指定委派的逐步解說,請參閱 逐步解說:擴充伺服器總管以顯示 Web 組件。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。