Esempio n. 1
0
        private async void Handle_ItemTapped(object sender, ItemTappedEventArgs e)
        {
            if (e.Item == null)
            {
                return;
            }

            var weatherPage = new WeatherPage();

            weatherPage.BindingContext = e.Item;
            await Navigation.PushAsync(weatherPage);

            ((ListView)sender).SelectedItem = null;
        }
Esempio n. 2
0
        public CitiesListPage(WeatherPage parent)
        {
            try {
                InitializeComponent();
                _parent = parent;

                var Cities = App.Database.GetCities();
                citiesList          = new ObservableCollection <City>();
                this.BindingContext = Cities;

                foreach (var city in Cities)
                {
                    citiesList.Add(city);
                }

                MyListView.ItemsSource = citiesList;
            }
            catch (Exception npe)
            {
                System.Diagnostics.Debug.WriteLine(npe);
            }
        }
Esempio n. 3
0
        private void Weather_OnClicked(object sender, EventArgs e)
        {
            WeatherPage weather = new WeatherPage();

            this.Navigation.PushAsync(weather);
        }