public void OnWindowClosing(object sender, CancelEventArgs e) { CameraVM.Dispose(); SpectrometerVM.Dispose(); MeasurementVM.Dispose(); App.Current.Shutdown(); }
public void OnViewLoaded(object sender, RoutedEventArgs e) { MainWindow mainWindow = Application.Current.Windows.OfType <MainWindow>().FirstOrDefault(); // how to access usercontrol instance declared in xaml XYZMotorVM.SetPointSelectedHandler(ref mainWindow.borderInstance); SpectrometerVM.MainWindow_SourceInitialized(mainWindow.MainWin); ConnectAll(); }
private void ConnectAll() { CameraVM.connectCamera(); XYZMotorVM.connectMotor(); SpectrometerVM.connectSpectrum(); }