private void ItemSelected(object sender, SelectedItemChangedEventArgs e) { var weatherDetailView = new WeatherDetailPage(); weatherDetailView.ViewModel.SetWeatherRequest(e.SelectedItem as WeatherRequest); Navigation.PushAsync(weatherDetailView); }
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); }
private void ItemSelected(object sender, SelectedItemChangedEventArgs e) { var weatherDetailView = new WeatherDetailPage(); Navigation.PushAsync(weatherDetailView); }