Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections.ObjectModel;
- using Xamarin.Forms;
- using Xamarin.Forms.Xaml;
- namespace Pj4.Views
- {
- [XamlCompilation(XamlCompilationOptions.Compile)]
- public partial class LocationsPage : ContentPage
- {
- public LocationsPage()
- {
- InitializeComponent();
- Locations l = new Locations();
- ObservableCollection<Locations> LocationList = new ObservableCollection<Locations>();
- LocationView.ItemsSource = LocationList;
- foreach (Location loc in l.GetLocations())
- {
- LocationList.Add(new Locations() { name = loc.name });
- }
- LocationView.ItemsSource = LocationList;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement