public async override void OnNavigatedTo(INavigationParameters parameters) { base.OnNavigatedTo(parameters); switch (parameters.GetNavigationMode()) { case NavigationMode.Back: break; case NavigationMode.New: ListCategoryBindProp = new ObservableCollection <VisualCategoryModel>(); var categoryLogic = new CategoryLogic(_dbContext); var listCate = await categoryLogic.GetAllAsync(); foreach (var category in listCate) { ListCategoryBindProp.Add(new VisualCategoryModel { Id = category.Id, Status = Status.Normal, CategoryName = category.CategoryName }); } if (parameters.ContainsKey(Keys.IS_EDITING)) { IsEditing = true; } break; case NavigationMode.Forward: break; case NavigationMode.Refresh: break; default: break; } }