private async void Menu_ItemTapped(object sender, ItemTappedEventArgs e) { if (e.Item.ToString() == "Nazad") { await Navigation.PopAsync(); } Page gotoPage = new GenericPage(e.Item.ToString()); switch (e.Item.ToString()) { case "Projekti": //gotoPage = new DetailsPage(); break; case "Aktivnosti": //gotoPage = new MainPage(); break; case "Zahtevi": //gotoPage = new DokumentaPage(); break; default: //gotoPage = new MainPage(); break; } Detail = new NavigationPage(gotoPage); ((ListView)sender).SelectedItem = null; this.IsPresented = false; }
private async void OnClick(object sender, EventArgs e) { Page gotoPage = null; switch ((sender as ToolbarItem).Text) { case "Podesavanja": gotoPage = new PodesavanjaPage(); break; case "Nalog": gotoPage = new GenericPage("Nalog Page"); break; case "Odjavi se": // ova se malo razlikuje App.Current.MainPage = new LoginPage(); return; } await Navigation.PushAsync(gotoPage); }