public MainWindow()
 {
     InitializeComponent();
     vm = new MainViewModel((Chart)graph.Child);
     this.DataContext = vm;
 }
 public CaptureImageWindow(MainViewModel mainVM)
 {
     InitializeComponent();
     this.DataContext = mainVM;
 }