FileExplorerAssistant.Attach(TreeList, Action<TreeListExtension>) Method
Creates a new TreeListExtension and attaches it to the target Tree List.
Namespace: DevExpress.XtraDialogs
Assembly: DevExpress.XtraDialogs.v25.1.dll
NuGet Packages: DevExpress.Win.Dialogs, DevExpress.Win.Navigation
Declaration
public TreeListExtension Attach(
TreeList treeList,
Action<TreeListExtension> settings = null
)
Parameters
| Name | Type | Description |
|---|---|---|
| treeList | TreeList | The |
Optional Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| settings | Action<DevExpress.XtraDialogs.FileExplorerExtensions.TreeListExtension> | null | A delegate that sets up the newly created |
Returns
| Type | Description |
|---|---|
| DevExpress.XtraDialogs.FileExplorerExtensions.TreeListExtension | The newly created |
Remarks
The code below illustrates how to create a TreeListExtension with required settings and attach it to the “treeList1” control. The GuidNode added to the RootNodes collection is the “Desktop” Windows folder.
var extension = fileExplorerAssistant1.Attach(treeList1, x=> {
x.RootNodes.Add(new GuidNode(new Guid("B4BFCC3A-DB2C-424C-B029-7FE99A87C641")));
// Other settings
});
See this article for more information on extensions and their core settings: Custom Browsers (FileExplorerAssistant Component).