private void gs_gridView_ItemClick(object sender, ItemClickEventArgs e) { ListItemDesktop lid = (ListItemDesktop)e.ClickedItem; if (lid != null) { string location = lid.li_fuelType.Tag.ToString() + "," + lid.li_brand.Tag.ToString(); Frame.Navigate(typeof(MainPage), location); } }
private void ShowDataOnList(string responseXml) { GasStations = GetItemList(responseXml); int items = GasStations.Count; list_title.Text = "Λίστα Πρατηρίων (" + items.ToString() + ")"; foreach (GasStation gs in GasStations) { ListItemDesktop lid = new ListItemDesktop(); lid.li_fuelType.Text = gs.FT; //Εισαγωγή του latitude και του longintude στα παιδία αυτά για χρήση αργότερα lid.li_fuelType.Tag = gs.LT; lid.li_brand.Tag = gs.LG; if (gs.BR == "ΑΝΕΞΑΡΤΗΤΟ ΠΡΑΤΗΡΙΟ") { lid.li_brand.Text = "ΑΠ"; } else if (gs.BR == "ΑΙΓΑΙΟ (AEGEAN)") { lid.li_brand.Text = "AEGEAN"; } else { lid.li_brand.Text = gs.BR; } lid.li_logo.Source = new BitmapImage(CommonMethods.GetFuelStationIcon(gs.BR_ID)); lid.li_price.Text = gs.FT_PR + " €"; lid.li_date.Text = gs.FT_DT; lid.li_owner.Text = gs.OW; lid.li_address.Text = gs.AD; lid.li_distance.Text = "Απόσταση από πρατήριο: " + gs.DIS + " km"; gs_gridViewDesktop.Items.Add(lid); } }