public DataDisplayPage() { //Content = new StackLayout { // Children = { // new Label { Text = "Hello ContentPage" } // } //}; ListView theListView; IEnumerable <SharedPrayerRequest> es = SeedData.Get(); //IEnumerable<SurveyResponse> es = service.GetQuestionsAsync (); // .GetResponsesForSurveyAsync (); // List<SurveyQuestion> es = (await service.GetQuestionsAsync ()).ToList(); // es = service.GetResponsesForSurveyAsync ("28f9279b-d975-4b02-9e5d-8a8d185c04d1"); //MESSAGES MessagingCenter.Subscribe <NewFunctionalCell> (this, "BoughtItem", ItemBought); MessagingCenter.Subscribe <NewFunctionalCell> (this, "AddOne", ItemQuantityIncreased); //var es = SeedData.Get (); theListView = new ListView() { BackgroundColor = Color.Transparent, HasUnevenRows = true, ItemsSource = es, ItemTemplate = new DataTemplate(() => { var functionalCell = new NewFunctionalCell(); return(functionalCell); }) }; theListView.ItemTemplate.SetBinding(NewFunctionalCell.TextProperty, "FirstName"); Content = new StackLayout { Children = { theListView } }; }
internal void ItemBought(NewFunctionalCell item) { //write something here }
internal void ItemQuantityIncreased(NewFunctionalCell item) { //write something here }