public AddPatientPage(List <Models.Genders> genderses, List <Models.BloodGroups> bloodGroupsesList) { var TheViewModel = new AddPatientsViewModel(); BindingContext = TheViewModel; InitializeComponent(); PickerGender.ItemsSource = genderses.ToList(); PickerBlood.ItemsSource = bloodGroupsesList.ToList(); }
//private List<Models.Genders> _Genders; //private List<Models.BloodGroups> _BloodGroups; //private DataServices _dataServices = new DataServices(); public AddPatientPage(List <Models.Genders> genderses, List <Models.BloodGroups> bloodGroupsesList) { //_Genders = _dataServices.GetGenders(); var TheViewModel = new AddPatientsViewModel(); //var _BloodGroupss = new List<BloodGroups>(); BindingContext = TheViewModel; //var monkeyList = new List<string>(); //monkeyList.Add("Baboon"); //monkeyList.Add("Capuchin Monkey"); //monkeyList.Add("Blue Monkey"); //PickerGender.ItemDisplayBinding = genderses.Select(x =>x.Name ).First(); InitializeComponent(); PickerGender.ItemsSource = genderses.ToList(); PickerBlood.ItemsSource = bloodGroupsesList.ToList(); }