Skip to main content

DXFolderBrowserDialog.RootFolder Property

Gets or sets the root folder from which the navigation starts.

Namespace: DevExpress.Xpf.Dialogs

Assembly: DevExpress.Xpf.Dialogs.v21.2.dll


public Environment.SpecialFolder RootFolder { get; set; }

Property Value

Type Description

A System.Environment+SpecialFolder object that specifies the folder from which the navigation starts.


Only the specified folder and any subfolders that are beneath it will appear in the dialog box and be selectable.

The DXFolderBrowserDialog.SelectedPath property, along with RootFolder, determines what the selected folder will be when the dialog box is displayed, as long as DXFolderBrowserDialog.SelectedPath is an absolute path that is a subfolder of RootFolder (or more accurately, points to a subfolder of the shell namespace represented by RootFolder).

The code sample below illustrates how to make DXFolderBrowserDialog navigate starting with the “Program Files: folder.

private void button_Click(object sender, RoutedEventArgs e) {
    var fileDialog = new DXFolderBrowserDialog();
    fileDialog.Description = "Select the folder you want to open:";
    fileDialog.RootFolder = Environment.SpecialFolder.ProgramFiles;
See Also