public static void GoToScreen(string screenName, Assembly assembly) { if (InteractionContext.IsPrototypingRuntimeLoaded) { string screenClassName = InteractionContext.GetScreenClassName(screenName); if (string.IsNullOrEmpty(screenClassName)) { return; } // an array that ends up being parameters to NavigationViewModel.NavigateToScreen(string name, bool record) object[] paramArrary = new object[] { screenClassName, true }; InteractionContext.navigateToScreenMethodInfo.Invoke(ActiveNavigationViewModelObject, paramArrary); } else { // Verify we could tell where we were if (assembly == null) { return; } // The Assembly which is hosting the calling behavior is the one we want to go to the component in AssemblyName assemblyName = new AssemblyName(assembly.FullName); if (assemblyName != null) { string hostAssembly = assemblyName.Name; InteractionContext.PlatformGoToScreen(hostAssembly, screenName); } } }
public static bool IsScreen(string screenName) { if (!InteractionContext.IsPrototypingRuntimeLoaded) { return(false); } return(InteractionContext.GetScreenClassName(screenName) != null); }