/// <summary> /// Invoked when an item is selected. /// </summary> /// <param name="attachedObject">The Object</param> private void ItemSelected(object attachedObject) { if (Device.RuntimePlatform == "UWP") { Application.Current.MainPage.Navigation.PushAsync(new DetailPage()); } else { Template template = new Template(); template.Name = "Detail Page"; template.PageName = "Views.Shopping.DetailPage"; Application.Current.MainPage.Navigation.PushAsync(new TemplateHostPage(template)); } }
/// <summary> /// Invoked when cart icon button is clicked. /// </summary> /// <param name="obj"></param> private void CartClicked(object obj) { if (Device.RuntimePlatform == "UWP") { Application.Current.MainPage.Navigation.PushAsync(new CartPage()); } else { Template template = new Template(); template.Name = "Cart Page"; template.PageName = "Views.Shopping.CartPage"; Application.Current.MainPage.Navigation.PushAsync(new TemplateHostPage(template)); } }
/// <summary> /// Invoked when the Done button is clicked. /// </summary> /// <param name="obj">The Object</param> private void Next(object obj) { var itemCount = (obj as SfRotator).ItemsSource.Count(); if (this.ValidateAndUpdateSelectedIndex(itemCount)) { if (Device.RuntimePlatform == "UWP") { Application.Current.MainPage.Navigation.PushAsync(new LoginPage()); } else { Template template = new Template(); template.Name = "Login Page"; template.PageName = "Views.Shopping.LoginPage"; Application.Current.MainPage.Navigation.PushAsync(new TemplateHostPage(template)); } } else { this.MoveToNextPage(); } }