Code snippet: Open Folder Browser Dialog in WPF

Install WPFFolderBrowser 1.0.2 from nuget gallery to use the Windows Vista / Windows 7 Folder Browser Dialog from your WPF projects, without any additional dependencies.

Install-Package WPFFolderBrowser
then import WPFFolderBrowser

using WPFFolderBrowser;
private void BrowseFolder()
        {
            WPFFolderBrowserDialog dd = new WPFFolderBrowserDialog();
            var result = dd.ShowDialog();
            if (result.HasValue)
            {
                TxtFvsAccessDbPath = dd.FileName;
            }
        }

Comments

Popular posts from this blog

Prevent WPF Global Keyboard Hook from stops working after hitting keys a while C# .NET

Generate ArcGIS Token By URL Request From ArcGIS Portal, Federated Environment , ESRI JS API and Angular snippets

Solution: IntelliJ not recognizing a particular file correctly, instead its stuck as a text file