How do you navigate to page in external app from another external app?

4 replies. Last post: May 19, 2011 7:23 AM by Jimmy Petrus
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
bap Member

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();      
        }
All times are GMT -5. The time now is 8:49 PM.
Previous Next