public async Task NewProject() { var dialog = new OpenFolderDialog(); var result = await dialog.ShowAsync(new Window()); if (!String.IsNullOrEmpty(result)) { var window = new NewProjectDialog(result); window.Show(); } }
private void New_Click(object sender, RoutedEventArgs e) { var dialog = new CommonOpenFileDialog(); dialog.Title = "Select Folder"; dialog.IsFolderPicker = true; dialog.AddToMostRecentlyUsedList = false; dialog.AllowNonFileSystemItems = false; dialog.EnsureFileExists = true; dialog.EnsurePathExists = true; dialog.EnsureReadOnly = false; dialog.EnsureValidNames = true; dialog.Multiselect = false; dialog.ShowPlacesList = true; var result = dialog.ShowDialog(); if (result == CommonFileDialogResult.Ok) { var folderPath = dialog.FileName; var dialogWindow = new NewProjectDialog(folderPath); dialogWindow.Show(); } }
/// <summary> /// Opens dialog for creating new project. /// </summary> private void OpenNewProjectDialog() { newProjectDialog = new NewProjectDialog(); // New project dialog has it's own view. newProjectDialog.Show(); }