private void RemoveImage_Executed(object sender, ExecutedRoutedEventArgs e) { // Store current image in the webcam BitmapSource bitmap = e.Parameter as BitmapSource; if (bitmap != null) { SelectedImages.Remove(bitmap); } }