private async void OnItemSelected(ICategoriesItemVM item) { var categoriesType = Mvx.Resolve <IProductConfigService>().Config.CategoriesType; if (categoriesType == Models.CategoriesType.Mixed && item.IsFolder) { Loading = true; var categories = await CategoriesVmService.LoadItemsFor(item.CategoryID); if (!categories.IsNullOrEmpty() && !categories.All(x => x != null && !x.IsFolder)) { NavigationVmService.NavigateToSSCategory(new CategoryBundle(item.CategoryID, item.Name, Base.Core.Models.Navigation.NavigationType.DoublePush)); Loading = false; return; } Loading = false; } if (item.IsFolder) { NavigationVmService.NavigateToCategory(new CategoryBundle(item.CategoryID, item.Name, Base.Core.Models.Navigation.NavigationType.DoublePush)); } else { NavigationVmService.NavigateToProducts(new ProductsBundle(item.CategoryID, item.Name, string.Empty, Base.Core.Models.Navigation.NavigationType.Push)); } }
protected virtual void OnItemSelected(ICategoriesItemVM item) { CurrentPage = Items.IndexOf(item); }