iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
I have 2 external xaps in composite test application:
Main.xap (startup xap)
App1.xap (external)
App2.xap (external)
I'm trying to navigate to a page in App1 from App2 but it's not working...
More info:
App2.MainPage.xaml has nav link to App1.Views.UXPage1
<Intersoft:UXHyperlinkButton Content="Go to Page2 in external app1" NavigateUri="/MyApp1/Files"/>
How do i setup the URI Mapping in UXFrame in Main.MainPage.Xap to get the nav link in App2.MainPage to work so when clicked it navigates to App1.Views.UXPage1.xaml? Any help much appreciated!
Here's the current UXFrame URI mapping in Main.MainPage.xap:
<Intersoft:UXFrame x:Name="ContentFrame" Source="/Overview/Home" EnablePageTransition="True" DefaultTransitionEffect="SlideLeft" AutoDetectNavigationDirection="True" NewTransitionEffect="Fading" AllowNestedFrameNavigation="True" TransitionStrategy="WaitContentReady" UseGlobalShell="True" AutoMapApplications="True" > <Intersoft:UXFrame.UriMapper> <Intersoft:UriMapper> <Intersoft:UriMapping Uri="" MappedUri="/Views/Home.xaml"/> <Intersoft:UriMapping Uri="/Error" MappedUri="/ErrorPage.xaml"/> <Intersoft:UriMapping Uri="/Overview/Home" MappedUri="/Views/Home.xaml"/> <Intersoft:UriMapping Uri="/Overview/About" MappedUri="/Views/About.xaml"/> <Intersoft:UriMapping Uri="/MyApp1" MappedUri="/App1"/> <Intersoft:UriMapping Uri="/MyApp2" MappedUri="/App2"/> <Intersoft:UriMapping Uri="/MyApp1/Files" MappedUri="/Views/UXPage1.xaml"/> <Intersoft:UriMapping Uri="/{page}/{category}" MappedUri="/Views/{page}.xaml?id={category}"/> <Intersoft:UriMapping Uri="/{page}" MappedUri="/Views/{page}.xaml"/> </Intersoft:UriMapper> </Intersoft:UXFrame.UriMapper> </Intersoft:UXFrame> Below is App Packages loaded in Main.App.xaml.cs app startup: private void Application_Startup(object sender, StartupEventArgs e) { // create a new ApplicationPackage that represents App1 ApplicationPackage app1 = new ApplicationPackage() { ID = "App1", Name = "App1", Source = new Uri("App1.xap", UriKind.RelativeOrAbsolute), EnableMetadataDiscovery = true, VirtualPathIdentity = "/App1", Size = -1 // auto detect the file size at runtime }; // add the application to the UXShell UXShell.Current.Applications.Add(app1); ApplicationPackage app2 = new ApplicationPackage() { ID = "App2", Name = "App2", Source = new Uri("App2.xap", UriKind.RelativeOrAbsolute), EnableMetadataDiscovery = true, VirtualPathIdentity = "/App2", Size = -1 // auto detect the file size at runtime }; // add the application to the UXShell UXShell.Current.Applications.Add(app2); shellManager.RootPage = new MainPage(); this.RootVisual = shellManager.RootPage; //this.RootVisual = new MainPage(); }
I think i figured it out. i had to configure the URIMapping to use type name (per your docs)
example below:
<Intersoft:UriMapping Uri="/MyApp1/Files" MappedUri="/MyApp1;/MyApp1.Views/UXPage1"/>
Hello,Local page navigation in externally loaded application is already supported in nested frame scenario. This means that each external app has its own UXFrame which is responsible to define its own UriMapping. In real-world scenarios, the shell has no knowledge about the applications that will be loaded, and what mappings that it needs to define in order to route the application's pages properly. In short, the mappings are all defined in each external app's UXFrame which serves as the child navigation. This allows the sub-paths, i.e., /App1/SubPath1 to be translated automatically according to the defined mappings.However, looking at your scenario at a glance, you don't seem to define UXFrame in each external application, is this correct? Presuming this is correct, we would like to learn your scenario further to understand what you're trying to do with the sub-paths in the root navigation frame. We will also need a simple working sample that illustrates this particular scenario to allow our engineers to implement the best solution with solid architecture.To give you a quick insight, if we have to support the sub-paths navigation in the root frame, the architecture shall allow developers to define the mappings "externally", not in the UXFrame as shown in the vanilla sample above.I look forward to your response and a working sample to address your specific scenario. Let me know if you have any questions.Best,Jimmy
Hi Jimmy,
Thanks for the response. I simply want to modularize my application and have pages within multiple xaps load within the same "parent" UXFrame.
Consider your OutlookNavApplication template. I would like to create a parent application (Main.xap) using the OutlookNavigationApplication template. I would then like to use the basic Intersoft ClientUI Application template to create external xaps. I would like each NavigationPaneItem in the Main.xap (Overview, Mail, Contact etc...) be associated to an external xap (Overview.xap, Mail.xap, Contact.xap etc...). When a user clicks on Overview NavigationPanelItem in Main.xap the Overview.xap downloads and installs and the default page is displayed in the Main.xap UXFrame. When a use clicks a NavigationButton item within the Overview NavigationPaneItem, I would like the UXFrame to load the associated view from within Overview.xap views folder. Can this be done?
If not, does this mean i need to make each external xap using the OutlookNavApplication template? That doesn't seem like it will work.
Any help would be much appreciated!
Yes, using type-based URI should definitely work. However, you should resort to this solution only if physical URI cannot be achieved entirely. There are a number of disadvantages using type-based URI, such as your external apps will broke if the namespace is changed. It's okay if you can live with it.
Let me know if you feel that we should support physical URI in the externally loaded application for cross app navigation.
Thanks,Jimmy
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname