//private void ToggleAppBarButton(bool showPinButton) //{ // if (showPinButton) // { // this.StartPin.Label = "Agg a start"; // this.StartPin.Icon = new SymbolIcon(Symbol.Pin); // } // else // { // this.StartPin.Label = "Rim da Start"; // this.StartPin.Icon = new SymbolIcon(Symbol.UnPin); // } // this.StartPin.UpdateLayout(); //} private async void loadStations() { //ObservableCollection<TrainStop> stations = await DBSource.Stations; //foreach (TrainStop stop in stations) //{ // MapIcon icon = new MapIcon(); // icon.Title = stop.Name; // icon.NormalizedAnchorPoint = new Point(0.5, 1.0); // icon.Location = new Geopoint(new BasicGeoposition() // { // Latitude = stop.Latitude, // Longitude = stop.Longitude // }); // icon.Image = RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///Assets/Segnalino.png")); // Mappa.MapElements.Add(icon); //} Puspins.ItemsSource = await DBSource.getStopsPreload(); Puspins.ItemsSource = await DBSource.Stations; }