public string GetDirectoryPath() { var dlg = new FolderBrowserDialog(); System.Windows.Forms.DialogResult result = dlg.ShowDialog(hostWpfWindow.GetIWin32Window()); if (result == DialogResult.OK) { return(dlg.SelectedPath); } else { return(String.Empty); } }