private void DeleteSelectedContours_Executed(object sender, ExecutedRoutedEventArgs e) { var selected = ContoursBox.SelectedItems.Cast <ContourInformation>().ToList(); foreach (ContourInformation cInfo in selected) { Contours.Remove(cInfo); } }