private void Remove(object sender, RoutedEventArgs e) { var result = RadMessageBox.Show("Once a label is removed it can not be recovered. \r\n\r\nAre you sure you want to remove this label?", "Remove Label", MessageBoxButtons.YesNo, RadMessageIcon.Question); if (result != DialogResult.Yes) { return; } if (OnRemoveLabelsForProduct == null) { return; } Button button = sender as Button; string id = button.Tag.ToString(); var innerListView = button.GetAncestorOfType <ListView>(); var outListViewItem = innerListView.GetAncestorOfType <ListViewItem>(); GetSelectedSide(outListViewItem); ApplyStyleToProduct(innerListView); var activeproducts = (ObservableCollection <CutItem>)innerListView.ItemsSource; activeproducts.RemoveByPredicate(x => x.Id == id); innerListView.ItemsSource = activeproducts; OnRemoveLabelsForProduct(sender, e); }