# FolderBrowserDialog

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (3.1.0.0)

* [CommonDialog](https://docs.wisej.com/api/v3.1/wisej.web/common-dialogs/wisej.web.commondialog)
  * [FolderBrowserDialog](https://docs.wisej.com/api/v3.1/wisej.web/common-dialogs/wisej.web.folderbrowserdialog)

Allows the user to select a folder from one of the [Roots](#roots).

{% tabs %}
{% tab title="C#" %}

```csharp
public class FolderBrowserDialog : CommonDialog
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class FolderBrowserDialog
    Inherits CommonDialog
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](https://3858804530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1zeuyneJ2f5i3NKcg6us%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)FolderBrowserDialog()

Initializes a new instance of [FolderBrowserDialog](https://docs.wisej.com/api/v3.1/wisej.web/common-dialogs/wisej.web.folderbrowserdialog).

### ![](https://3858804530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1zeuyneJ2f5i3NKcg6us%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)FolderBrowserDialog(roots)

Initializes a new instance of [FolderBrowserDialog](https://docs.wisej.com/api/v3.1/wisej.web/common-dialogs/wisej.web.folderbrowserdialog) using the initial *roots* .

| Name      | Type                                                                                                         | Description                                                                                                                                        |
| --------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| **roots** | [IFileSystemProvider\[\]](https://docs.wisej.com/api/v3.1/wisej.core/general/wisej.core.ifilesystemprovider) | Initial file systems to load in the [FolderBrowserDialog](https://docs.wisej.com/api/v3.1/wisej.web/common-dialogs/wisej.web.folderbrowserdialog). |

### ![](https://3858804530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1zeuyneJ2f5i3NKcg6us%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)FolderBrowserDialog(container)

Initializes a new instance of the [FolderBrowserDialog](https://docs.wisej.com/api/v3.1/wisej.web/common-dialogs/wisej.web.folderbrowserdialog) extender with a specified container.

| Name          | Type                                                                                       | Description                                                                                                                                                                                                                                                 |
| ------------- | ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **container** | [IContainer](https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.icontainer) | An [IContainer](https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.icontainer) that represents the container of the [FolderBrowserDialog](https://docs.wisej.com/api/v3.1/wisej.web/common-dialogs/wisej.web.folderbrowserdialog) component. |

## Properties

### ![](https://3858804530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1zeuyneJ2f5i3NKcg6us%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Description

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets the description splayed above the tree view control in the dialog box. (Default: `""`)

### ![](https://3858804530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1zeuyneJ2f5i3NKcg6us%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Roots

[FileDialogRootCollection](https://docs.wisej.com/api/v3.1/wisej.web/common-dialogs/wisej.web.filedialogrootcollection): List of root [IFileSystemProvider](https://docs.wisej.com/api/v3.1/wisej.core/general/wisej.core.ifilesystemprovider) file systems displayed by the FolderBrowserDialog.

The Roots collection and the [IFileSystemProvider](https://docs.wisej.com/api/v3.1/wisej.core/general/wisej.core.ifilesystemprovider) implementations allow the application to use arbitrary names mapped to a specific path. For example, the app may add a root object named "Documents" to "c:\users\[logged-user-id]\files\documents". Each user will see "Documents" as the root, but will also see only the files in the \[logged-user-id] directory.

### ![](https://3858804530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1zeuyneJ2f5i3NKcg6us%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SelectedPath

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns sets the path selected by the user. (Default: `""`)

### ![](https://3858804530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1zeuyneJ2f5i3NKcg6us%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ShowHelp

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Returns or sets whether the Help button is displayed in the file dialog box. (Default: `False`)

### ![](https://3858804530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1zeuyneJ2f5i3NKcg6us%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Title

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets the file dialog box title. (Default: `""`)

## Methods

### ![](https://3858804530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1zeuyneJ2f5i3NKcg6us%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetRoot(path)

Returns the [IFileSystemProvider](https://docs.wisej.com/api/v3.1/wisej.core/general/wisej.core.ifilesystemprovider) that contains the specified *path* .

| Parameter | Type                                                                | Description                                                   |
| --------- | ------------------------------------------------------------------- | ------------------------------------------------------------- |
| **path**  | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) | Full path of the file to locate in on of the [Roots](#roots). |

**Returns:** [IFileSystemProvider](https://docs.wisej.com/api/v3.1/wisej.core/general/wisej.core.ifilesystemprovider). The [IFileSystemProvider](https://docs.wisej.com/api/v3.1/wisej.core/general/wisej.core.ifilesystemprovider) that contains the specified *path* or null if not found.

### ![](https://3858804530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1zeuyneJ2f5i3NKcg6us%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)MapPath(folderPath)

Maps the virtual path to the corresponding physical path on the specific [IFileSystemProvider](https://docs.wisej.com/api/v3.1/wisej.core/general/wisej.core.ifilesystemprovider) implementation.

| Parameter      | Type                                                                | Description                                             |
| -------------- | ------------------------------------------------------------------- | ------------------------------------------------------- |
| **folderPath** | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) | Virtual path to map to the corresponding physical path. |

**Returns:** [String](https://docs.microsoft.com/en-us/dotnet/api/system.string). The physical path for the [IFileSystemProvider](https://docs.wisej.com/api/v3.1/wisej.core/general/wisej.core.ifilesystemprovider) implementation.

### ![](https://3858804530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1zeuyneJ2f5i3NKcg6us%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Reset()

Resets all properties to their default values.

## Events

### ![](https://3858804530-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1zeuyneJ2f5i3NKcg6us%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)LoadPath

[FileDialogLoadPathEventHandler](https://docs.wisej.com/api/v3.1/wisej.web/common-dialogs/wisej.web.filedialogloadpatheventhandler) Fired when the file dialog is loading a file or folder.
