public virtual void AddPage <T>(AppStandardNavMenuItem menuItem, object data = null) where T : FreshBasePageModel { var page = FreshPageModelResolver.ResolvePageModel <T>(data); page.GetModel().CurrentNavigationServiceName = NavigationServiceName; _pagesInner.Add(page); var navigationContainer = CreateContainerPage(page); _pages.Add(menuItem.Name, navigationContainer); menuItems.Add(menuItem); _pageNames.Add(menuItem.Name); if (_pages.Count == 1) { Detail = navigationContainer; } }
public virtual void AddPage(string modelName, AppStandardNavMenuItem menuItem, object data = null) { var pageModelType = Type.GetType(modelName); var page = FreshPageModelResolver.ResolvePageModel(pageModelType, null); page.GetModel().CurrentNavigationServiceName = NavigationServiceName; _pagesInner.Add(page); var navigationContainer = CreateContainerPage(page); _pages.Add(menuItem.Name, navigationContainer); menuItems.Add(menuItem); _pageNames.Add(menuItem.Name); if (_pages.Count == 1) { Detail = navigationContainer; } }