//click the patients button private void patientsButton_Click(object sender, RoutedEventArgs e) { PatientsWindow patientsWindow = new PatientsWindow(); //patientsWindow.Owner = this; //TODO idk if i should remove this patientsWindow.Show(); }
} //dont understand how binding works but if this is gone it stops working public PatientsWindow() { patientList = new ObservableCollection <Patient>(); PatientsWindow.newWindowOpened += handleNewWindow; MainWindow.mainClosed += handleMainClose; PatientsWindow.newWindowOpened(this, null); InitializeComponent(); this.PatientList.SelectionChanged += Patient_Selected; loadPatients(); }