public EnteringPageViewModel() { GetCityWeatherCommand = new Command(async() => { CurrentWeatherConst.Location = TownName; var weatherPageVM = new CurrentWeatherViewModel(/*TownName*/); var weatherPage = new CurrentWeatherPage(); weatherPage.BindingContext = weatherPageVM; await Application.Current.MainPage.Navigation.PushModalAsync(weatherPage); }); OnClickedBackCommand = new Command(async() => { await Application.Current.MainPage.Navigation.PopModalAsync(); }); }
public App() { InitializeComponent(); MainPage = new CurrentWeatherPage(); }