示例#1
0
        private void ItemSelected(object sender, SelectedItemChangedEventArgs e)
        {
            var weatherDetailView = new WeatherDetailPage();

            weatherDetailView.ViewModel.SetWeatherRequest(e.SelectedItem as WeatherRequest);

            Navigation.PushAsync(weatherDetailView);
        }
示例#2
0
        private void ItemSelected(object sender, SelectedItemChangedEventArgs e)
        {
            var weatherDetailView = new WeatherDetailPage();

            switch (e.SelectedItem)
            {
            case LocationWeatherRequest lwr:
                weatherDetailView.ViewModel.SetWeather(lwr.City.Name, lwr.Weather);
                break;

            case WeatherRequest wr:
                weatherDetailView.ViewModel.SetWeatherRequest(wr);
                break;
            }

            WeatherSelected?.Invoke(e.SelectedItem as WeatherRequest);
        }
示例#3
0
        private void ItemSelected(object sender, SelectedItemChangedEventArgs e)
        {
            var weatherDetailView = new WeatherDetailPage();

            Navigation.PushAsync(weatherDetailView);
        }