private void mainWindow_Loaded(object sender, System.Windows.RoutedEventArgs e) { // TODO: Add event handler implementation here. webcam = new WebCam(); webcam.InitializeWebCam(ref imgVideo); }