private void DeleteExp_Execute(object o, ExecutedRoutedEventArgs args) { if (tabControl.SelectedItem == mathTab) { var item = (MathWorkspaceItemViewModel)this.mathControl.mathExpsListBox.SelectedItem; mathPresenter.Remove(item); } else if (tabControl.SelectedItem == graphsTab) { var item = (GraphItemViewModel)this.graphsControl.graphsList.SelectedItem; graphsPresenter.Remove(item); } }
private void removeMath_Click(object o, RoutedEventArgs args) { var item = ((Button)o).Tag as MathWorkspaceItemViewModel; presenter.Remove(item); }