{"id":14976801,"url":"https://github.com/evaristocuesta/folderbrowserex","last_synced_at":"2025-10-27T21:31:25.957Z","repository":{"id":143364852,"uuid":"310124009","full_name":"evaristocuesta/FolderBrowserEx","owner":"evaristocuesta","description":"FolderBrowserEx is a library to use the Windows Vista/7 Folder Browser in your .NET Framework and .NET Core Applications.","archived":false,"fork":false,"pushed_at":"2021-07-26T17:34:00.000Z","size":126,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T08:41:43.739Z","etag":null,"topics":["browser","classlibrary","csharp","csharp-library","dialog","folder","folderbrowserdialog","mvvm","netcore","netframework","vista","windows","windows-7","windows-vista","wpf"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/FolderBrowserEx/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evaristocuesta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-04T21:41:29.000Z","updated_at":"2024-11-19T18:06:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"6d0f7ffc-86f5-4312-98d7-cea46731bcf6","html_url":"https://github.com/evaristocuesta/FolderBrowserEx","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evaristocuesta%2FFolderBrowserEx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evaristocuesta%2FFolderBrowserEx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evaristocuesta%2FFolderBrowserEx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evaristocuesta%2FFolderBrowserEx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evaristocuesta","download_url":"https://codeload.github.com/evaristocuesta/FolderBrowserEx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238561035,"owners_count":19492628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","classlibrary","csharp","csharp-library","dialog","folder","folderbrowserdialog","mvvm","netcore","netframework","vista","windows","windows-7","windows-vista","wpf"],"created_at":"2024-09-24T13:54:28.826Z","updated_at":"2025-10-27T21:31:25.492Z","avatar_url":"https://github.com/evaristocuesta.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FolderBrowserEx\n[![NuGet](https://img.shields.io/nuget/v/FolderBrowserEx)](https://nuget.org/packages/FolderBrowserEx/) [![Downloads](https://img.shields.io/nuget/dt/FolderBrowserEx)](https://nuget.org/packages/FolderBrowserEx/) [![.NET Core](https://github.com/evaristocuesta/FolderBrowserEx/workflows/.NET%20Core/badge.svg)](https://github.com/evaristocuesta/FolderBrowserEx/actions) [![Languages](https://img.shields.io/github/languages/top/evaristocuesta/FolderBrowserEx)](https://github.com/evaristocuesta/FolderBrowserEx/) [![License](https://img.shields.io/github/license/evaristocuesta/FolderBrowserEx)](https://raw.githubusercontent.com/evaristocuesta/FolderBrowserEx/master/LICENSE) [![Author](https://img.shields.io/badge/author-Evaristo%20Cuesta-blue)](https://www.evaristocuesta.com/)\n\n**FolderBrowserEx** is a library to use the Windows Vista/7 Folder Browser in your .NET Framework and .NET Core Applications with which you can be able to select multiple folders. \n\nSupporting .NET Framework (4.5+) and .NET Core (3.0 and 3.1)\n\n![Game Screenshot](./Resources/Screenshot-01.JPG)\n\n## Table of contents\n\n  - [Introduction](#introduction)\n  - [Getting Started](#getting-started)\n  - [License](#license)\n  - [Credits](#credits)\n\n## Introduction\n\nIn both .NET Framework and .NET Core applications we can use the control FolderBrowserDialog from System.Windows.Form. The problem is that the style of this controls looks very old and is very difficult to use, especially when it is compared to the new folder selection dialog which is used in Windows Vista. Unfortunately, it has not been included to .NET. \n\nThe aim of this project is to offer a Windows Vista look and feel folder browser dialog to easily give a more modern look to our .NET applications and with which you can be able to select multiple folders. \n\n## Getting Started\n\nTo use this library, there are a few options:\n\n  - Download the [Github repository](https://github.com/evaristocuesta/FolderBrowserEx)\n  - Use the [FolderBrowserEx Nuget Package](https://nuget.org/packages/FolderBrowserEx/)\n\nThe FolderBrowserDialog uses the IFolderBrowserDialog interface.\n```csharp\npublic interface IFolderBrowserDialog\n{\n    /// \u003csummary\u003e\n    /// Gets/sets the title of the dialog\n    /// \u003c/summary\u003e\n    string Title { get; set; }\n\n    /// \u003csummary\u003e\n    /// Gets/sets folder in which dialog will be open.\n    /// \u003c/summary\u003e\n    string InitialFolder { get; set; }\n\n    /// \u003csummary\u003e\n    /// Gets/sets directory in which dialog will be open \n    /// if there is no recent directory available.\n    /// \u003c/summary\u003e\n    string DefaultFolder { get; set; }\n\n    /// \u003csummary\u003e\n    /// Gets selected folder when AllowMultiSelect is false\n    /// \u003c/summary\u003e\n    string SelectedFolder { get; }\n\n    /// \u003csummary\u003e\n    /// Gets selected folders when AllowMultiSelect is true.\n    /// \u003c/summary\u003e\n    List\u003cstring\u003e SelectedFolders { get; }\n\n    bool AllowMultiSelect { get; set; }\n\n    /// \u003csummary\u003e\n    /// Shows the folder browser dialog with a the default owner\n    /// \u003c/summary\u003e\n    /// \u003creturns\u003e\n    /// System.Windows.Forms.DialogResult.OK if the user clicks OK in the dialog box;\n    /// otherwise, System.Windows.Forms.DialogResult.Cancel.\n    /// \u003c/returns\u003e\n    DialogResult ShowDialog();\n\n    /// \u003csummary\u003e\n    /// Shows the folder browser dialog with a the specified owner\n    /// \u003c/summary\u003e\n    /// \u003cparam name=\"owner\"\u003eAny object that implements IWin32Window to own the \n    /// folder browser dialog\n    /// \u003c/param\u003e\n    /// \u003creturns\u003e\n    /// System.Windows.Forms.DialogResult.OK if the user clicks OK in the dialog box;\n    /// otherwise, System.Windows.Forms.DialogResult.Cancel.\n    /// \u003c/returns\u003e\n    DialogResult ShowDialog(IWin32Window owner);\n\n    /// \u003csummary\u003e\n    /// Dispose the object\n    /// \u003c/summary\u003e\n    void Dispose();\n}\n```\nTo use in an application, you can follow this example code. There are others examples in the directory Samples of the solution. \n\n```csharp\nFolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog()\nfolderBrowserDialog.Title = \"Select a folder\";\nfolderBrowserDialog.InitialFolder = @\"C:\\\";\nfolderBrowserDialog.AllowMultiSelect = false;\nif (folderBrowserDialog.ShowDialog() == DialogResult.OK)\n{\n  string result += folderBrowserDialog.SelectedFolder;\n}\n```\n\nIf you want to use the FolderBrowserEx library from a View Model, follow this example code.\n\n```csharp\nusing FolderBrowserEx;\nusing MVVMBase;\nusing System.Windows.Forms;\nusing System.Windows.Input;\n\nnamespace NetFrameworkSample\n{\n    public class MainWindowViewModel : ViewModelBase\n    {\n        private readonly IFolderBrowserDialog _folderBrowserDialog;\n        private string _result;\n\n        public MainWindowViewModel(IFolderBrowserDialog folderBrowserDialog)\n        {\n            _folderBrowserDialog = folderBrowserDialog;\n            ShowFolderBrowserCommand = new Command(\n                ShowFolderBrowserCommandExecute, \n                ShowFolderBrowserCommandCanExecute);\n        }\n\n        public ICommand ShowFolderBrowserCommand { get; private set; }\n\n        public string Result\n        { \n            get { return _result; }\n            set { _result = value; OnPropertyChanged(); }\n        }\n\n        private bool ShowFolderBrowserCommandCanExecute()\n        {\n            return true;\n        }\n\n        private void ShowFolderBrowserCommandExecute()\n        {\n            _folderBrowserDialog.Title = \"Select multiple folders\";\n            _folderBrowserDialog.InitialFolder = @\"C:\\\";\n            _folderBrowserDialog.AllowMultiSelect = false;\n            if (_folderBrowserDialog.ShowDialog() == DialogResult.OK)\n            {\n                Result += $\"{_folderBrowserDialog.SelectedFolder}\\n\";\n            }\n        }\n    }\n}\n```\n\n## License\n\nCopyright © 2021 Evaristo Cuesta \n\n**FolderBrowserEx** is provided as-is under the MIT license. For more information see [LICENSE](https://github.com/evaristocuesta/FolderBrowserEx/blob/master/LICENSE).\n\n## Credits\n\nThis project was adapted from the code from [CodeProject](https://www.codeproject.com/Articles/5255769/Csharp-Select-FolderDialog-for-NET-Core-3-0) writen by [ftwnate917](https://www.codeproject.com/Members/ftwnate917) and improved with new features. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevaristocuesta%2Ffolderbrowserex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevaristocuesta%2Ffolderbrowserex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevaristocuesta%2Ffolderbrowserex/lists"}