Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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