private void btnAddFolder_Click(object sender, RoutedEventArgs e) { winFolder win = new winFolder { Owner = this }; win.ShowDialog(); LoadFolders(); }
private void FolderEditColumn_Click(object sender, RoutedEventArgs e) { try { var rowData = ((Hyperlink)e.OriginalSource).DataContext as FolderViewModel; if (rowData == null) { return; } winFolder win = new winFolder(rowData.Id) { Owner = this }; win.ShowDialog(); LoadFolders(); } catch (Exception ex) { string message = Functions.GetErrorFromException(ex); MessageBox.Show("A problem occurred while opening edit dialog.\n" + message, "Error", MessageBoxButton.OK, MessageBoxImage.Error); } }