private void Bt_OpenFolder_Click(object sender, RoutedEventArgs e) { FileSelector.FolderSelector folder = new FileSelector.FolderSelector(); folder.WindowStartupLocation = WindowStartupLocation.CenterOwner; Nullable <bool> result = folder.ShowDialog(); if (result == true) { TB_Work_Path.Text = folder.SelectedPath; } }
private void Button_Click(object sender, RoutedEventArgs e) { FileSelector.FolderSelector folder = new FileSelector.FolderSelector(); var result = folder.ShowDialog(); if (result ?? false) { DataRowView row = (DataRowView)LogPathGrid.SelectedItem; if (row != null) { (row[2]) = folder.SelectedPath; } } }