private void btnImport_Click(object sender, RoutedEventArgs e) { int previousDatasetIndex = Convert.ToInt16(cmbDataset.Items[cmbDataset.Items.Count - 1]); viewModel.Import(previousDatasetIndex); cmbDataset.Items.Add(previousDatasetIndex + 1); }