Load external xap on-demand. How?

3 replies. Last post: May 17, 2011 8:50 AM by Jimmy Petrus
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
bap Member

I would like to load a xap to external application when user clicks on navigation link.  your docs only show how to load external apps on startup (sample code below)....but your marketing material states you can load on demand.  how is this done?

Please note: my defintion of "on-demand" is when a user clicks on a navigation link that references the external xap.

 private void Application_Startup(object sender, StartupEventArgs e)
        {
            shellManager.RootPage = new MainPage();
            this.RootVisual = shellManager.RootPage;

            //this.RootVisual = new MainPage();

            // create a new ApplicationPackage that represents App1
            ApplicationPackage app = new ApplicationPackage()
            {
                ID = "App1",
                Name = "App1",
                Source = new Uri("App1.xap", UriKind.RelativeOrAbsolute),
                EnableMetadataDiscovery = true,
                Size = -1 // auto detect the file size at runtime
            };

            // add the application to the UXShell
            UXShell.Current.Applications.Add(app);

            // download the application
            app.Download(false);
        }
All times are GMT -5. The time now is 12:24 AM.
Previous Next