Skip to main content
All docs
V24.1

FileExplorerAssistant.Attach(TreeList, Action<TreeListExtension>) Method

Creates a new TreeListExtension and attaches it to the target Tree List.

Namespace: DevExpress.XtraDialogs

Assembly: DevExpress.XtraDialogs.v24.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 TreeList control that should be managed by a new TreeListExtension.

Optional Parameters

Name Type Default Description
settings Action<DevExpress.XtraDialogs.FileExplorerExtensions.TreeListExtension> null

A delegate that sets up the newly created TreeListExtension.

Returns

Type Description
DevExpress.XtraDialogs.FileExplorerExtensions.TreeListExtension

The newly created TreeListExtension attached to the target Tree List control.

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).

See Also