public override void ViewWillAppear (bool animated) { base.ViewWillAppear (animated); trips = new TripManager ().GetTrips (); if (trips.Count == 0) trips.Add (new Trip () { Title = "Bangalore", StartDate = DateTime.Now, EndDate = DateTime.Now }); var tripSource = new TripViewSource (trips); tripSource.TripSelectionChanged += (t) => { editTripScreenController = new EditTripScreenController(t); this.NavigationController.PushViewController(editTripScreenController, true); }; tripListView.Source = tripSource; }
public override void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); trips = new TripManager().GetTrips(); if (trips.Count == 0) { trips.Add(new Trip() { Title = "Bangalore", StartDate = DateTime.Now, EndDate = DateTime.Now }); } var tripSource = new TripViewSource(trips); tripSource.TripSelectionChanged += (t) => { editTripScreenController = new EditTripScreenController(t); this.NavigationController.PushViewController(editTripScreenController, true); }; tripListView.Source = tripSource; }