private void submitBtn_click(object sender, RoutedEventArgs e) { //create a new object with the parameters specified by the user Donor donor = new Donor() { Name = nameBox.Text, Age = ageBox.Text, BloodType = bloodTypeBox.Text, }; if (donorList == null) { donorList.donors = storedDonorList.GetDonors(); } donorList.AddDonor(donor); //add the object to the list since it is static the content the objects will remain the same }
protected override void OnNavigatedTo(NavigationEventArgs e) { //pass the object from the mainpage donorList = e.Parameter as DonorManager; Donors = donorList.GetDonors(); }