feature<FolderDialog>: remove View.FolderBrowser and use windows shell32 API to select folders

This commit is contained in:
leo 2021-05-26 11:08:31 +08:00
parent 0419cf96fc
commit 6061f5a074
8 changed files with 169 additions and 213 deletions

View file

@ -54,10 +54,11 @@ namespace SourceGit.Views.Popups {
}
private void OnFolderSelectorClick(object sender, System.Windows.RoutedEventArgs e) {
FolderBrowser.Open(null, App.Text("Clone.Folder.Placeholder"), path => {
Folder = path;
var dialog = new Controls.FolderDialog("Clone.Folder.Placeholder");
if (dialog.ShowDialog() == true) {
Folder = dialog.SelectedPath;
txtFolder.GetBindingExpression(TextBox.TextProperty).UpdateTarget();
});
}
}
}
}