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