/// <summary> /// Invoked when the CaptureImage command is executed /// </summary> /// <param name="sender">Sender</param> /// <param name="e">EventArgs</param> private void CaptureImage_Executed(object sender, ExecutedRoutedEventArgs e) { //// Store current image in the webcam BitmapSource bitmap = webcamPlayer.CurrentBitmap; if (bitmap != null) { SelectedImages.Add(bitmap); } }
private void ListboxSelectionChanged(object parameter) { SelectedImages.Clear(); var images = ((ListBox)parameter).SelectedItems; for (int i = 0; i < images.Count; i++) { SelectedImages.Add((ImageElement)images[i]); } }