/// <summary> /// Looks up the next view based on the incoming graph, view, and navigation values. /// </summary> /// <param name="navigationGraphName">Name of the navigation graph that is being worked in.</param> /// <param name="currentViewName">Name of the current view.</param> /// <param name="navigateValue">Navigate value used to determine the next view to be navigated to from the current view.</param> public virtual ViewSettings GetNextViewSettings(string navigationGraphName, string currentViewName, string navigateValue) { //Retrieve a navgraph class based on nav name NavigationGraphSettings navigationGraph = GetNavigationGraphSettings(navigationGraphName); ViewSettings nextView = null; // Get the current view node settings NodeSettings node = navigationGraph[currentViewName]; if (null == node) { throw new ConfigurationException(Resource.ResourceManager.FormatMessage(Resource.Exceptions.RES_ExceptionCouldNotGetNextViewType, navigationGraphName, currentViewName, navigateValue)); } // Get the next view name from the navigateTo node NavigateToSettings navigateTo = node[navigateValue]; if (null == navigateTo) { nextView = GetSharedTransitionView(navigationGraph, navigateValue); } else { nextView = GetViewSettingsFromName(navigateTo.View); } if (nextView == null) { throw new ConfigurationException(Resource.ResourceManager.FormatMessage(Resource.Exceptions.RES_ExceptionCouldNotGetNextViewType, navigationGraphName, currentViewName, navigateValue)); } return(nextView); }
private void LoadNavigationElements(XmlNode configNode) { foreach (XmlNode currentNode in configNode.SelectNodes(NodeNavigateTo)) { NavigateToSettings navigateTo = new NavigateToSettings(currentNode); _navigateToCollection.Add(navigateTo.NavigateValue, navigateTo); } }