using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; using SampleApp.ViewModels; using SampleApp.Views; using Xamarin.Forms; namespace SampleApp { // Learn more about making custom code visible in the Xamarin.Forms previewer // by visiting https://aka.ms/xamarinforms-previewer [DesignTimeVisible(false)] public partial class MainPage : ContentPage { public MainPage() { InitializeComponent(); BindingContext = new ListPageViewModel(); } private async void OnListViewItemTapped(object sender, ItemTappedEventArgs e) { var details = e.Item as APIFunctionality; if (sender is ListView lv) lv.SelectedItem = null; switch (details.Name) { case "1": await Navigation.PushAsync(new Functionality1()); break; case "2": await Navigation.PushAsync(new Functionality2()); break; case "3": await Navigation.PushAsync(new Functionality3()); break; case "4": await Navigation.PushAsync(new Functionality4()); break; case "5": await Navigation.PushAsync(new Functionality5()); break; case "6": await Navigation.PushAsync(new Functionality6()); break; case "7": // TO IMPLEMENT //await Navigation.PushAsync(new Functionality7()); break; case "8": await Navigation.PushAsync(new Functionality8()); break; case "9": // TO IMPLEMENT //await Navigation.PushAsync(new Functionality9()); break; case "10": // TO IMPLEMENT //await Navigation.PushAsync(new Functionality10()); break; case "11": await Navigation.PushAsync(new Functionality11()); break; case "12": // TO IMPLEMENT //await Navigation.PushAsync(new Functionality12()); break; case "13": // TO IMPLEMENT //await Navigation.PushAsync(new Functionality13()); break; case "14": await Navigation.PushAsync(new Functionality14()); break; case "15": // TO IMPLEMENT //await Navigation.PushAsync(new Functionality15()); break; case "16": // TO IMPLEMENT //await Navigation.PushAsync(new Functionality16()); break; case "17": await Navigation.PushAsync(new Functionality17()); break; case "18": await Navigation.PushAsync(new Functionality18()); break; case "19": // TO IMPLEMENT //await Navigation.PushAsync(new Functionality19()); break; case "20": // TO IMPLEMENT //await Navigation.PushAsync(new Functionality20()); break; case "21": await Navigation.PushAsync(new Functionality21()); break; case "22": await Navigation.PushAsync(new Functionality22()); break; case "23": await Navigation.PushAsync(new Functionality23()); break; case "24": // TO IMPLEMENT //await Navigation.PushAsync(new Functionality24()); break; } } } }