public TodayRatesPage() { InitializeComponent(); TodayRatesViewModel trvm = ((App)Application.Current).TodayRatesVM; TodayRatesListView1.ItemsSource = trvm.TodayRatesData; TodayRatesListView2.ItemsSource = trvm.TodayRatesData; TodayRatesListView3.ItemsSource = trvm.TodayRatesData; int hd = DependencyService.Get <IDisplaySize>().GetHeightDiP(); AbsoluteLayout.SetLayoutBounds(SideMenuOverlay, new Rectangle(0, 0, 0.9, hd - 20)); //Slide menu creating SlideMenu = ((App)Application.Current).SideMenu; //Toolbar taps TapGestureRecognizer ToolbarTap1 = new TapGestureRecognizer(); ToolbarTap1.Tapped += (s, e) => { this.ShowMenu(); }; Menu.GestureRecognizers.Add(ToolbarTap1); TapGestureRecognizer ToolbarTap2 = new TapGestureRecognizer(); ToolbarTap2.Tapped += (s, e) => { SearchPage sp = new SearchPage(); Application.Current.MainPage.Navigation.PushAsync(sp); }; Search.GestureRecognizers.Add(ToolbarTap2); }
public App() { InitializeComponent(); //ViewModels AuditLogVM = new AuditLogViewModel(); BuyerVM = new BuyerViewModel(); BuyerRankingsVM = new BuyerRankingsViewModel(); DashboardVM = new DashboardViewModel(); ExpensesVM = new ExpensesViewModel(); GrowerVM = new GrowerViewModel(); LadaanVM = new LadaanViewModel(); LatePaymentsVM = new LatePaymentsViewModel(); ProfileVM = new ProfileViewModel(); ProfitVM = new ProfitViewModel(); SearchVM = new SearchViewModel(); StockPendingDetailsVM = new StockPendingDetailsViewModel(); TodayRatesVM = new TodayRatesViewModel(); //Menu SideMenu = new SideMenuView(); /*LoginPage lp = new LoginPage(); * DashboardPage dp = new DashboardPage(); * PasswordRecoveryPage prp = new PasswordRecoveryPage(); * PasscodePage pcp = new PasscodePage(); * LadaanPage lap = new LadaanPage(); * TodayRatesPage trp = new TodayRatesPage(); * ChatPage cp = new ChatPage(); * ProfitPage pp = new ProfitPage(); * ExpensesListPage ep = new ExpensesListPage(); * BankAccountsPage bp = new BankAccountsPage(); * BankAccountDetailsPage bdp = new BankAccountDetailsPage(); * ArrivalPage ap = new ArrivalPage(); * ArrivalDetailsPage adp = new ArrivalDetailsPage(); * GrowerProfilePage gpp = new GrowerProfilePage(); * BuyerProfilePage bpp = new BuyerProfilePage(); * LatePaymentsPage lpp = new LatePaymentsPage(); * BuyerRankingsPage brp = new BuyerRankingsPage(); * SearchPage sp = new SearchPage(); * StockPendingPage spp = new StockPendingPage(); * StockPendingDetailsPage spdp = new StockPendingDetailsPage(); * SetupDashboardPage sdp = new SetupDashboardPage(); * NewsPage np = new NewsPage();*/ DashboardPage dp = new DashboardPage(); LoginPage lp = new LoginPage(); MainPage = new NavigationPage(lp); }