Skip to main content

Microsoft Silverlight

Answered Question Downloading the xap files as per the page requirementRSS Feed

(0)

ramya.mt
ramya.mt

Member

Member

9 points

28 Posts

Downloading the xap files as per the page requirement

Is there a way to download the xap of an entire silverlight app as per my aspx page requirements? I mean.. If I have 3 SL pages in the silverlight app and want to download the xap corresponding to only one SLPage when the app runs. Is it possible?

shamrat231
shamrat231

Contributor

Contributor

4717 points

595 Posts

Re: Downloading the xap files as per the page requirement

By 3 sl pages..i hope u mean three xaml pages like (page1.xaml, page2.xaml...) , don't get what u mean by downloading the application but u can change the see which xaml to show in which aspx page by using this.

By default, page.xaml/mainpage.xaml is set, in app.xaml.cs like this,

        private void Application_Startup(object sender, StartupEventArgs e)
        {
            this.RootVisual = new Page(); // change it to show which page u want to show in aspx page.

        }

if want to use the same SL application for all aspx page and show different xaml page in diff aspx page then u have to pass parameter to manipulate your Application_Startup method. Depending on your param u can show which page u want.

http://silverlight.net/learn/videos/silverlight-videos/using-startup-parameters-with-silverlight/

Please 'Mark as Answer' if it helps you

Sharker Khaleed Mahmud
Software Developer
(MCP,MCTS,MCPD[web])

This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.

Dhaka, Bangladesh
LinkedIn :: SL Profile :: Blog

Min-Hong Tang - MSFT
Min-Hong...

Contributor

Contributor

3584 points

412 Posts

Answered Question

Re: Downloading the xap files as per the page requirement

Hi,

   A xap package contains an entire silverlight Application. You have 3 SL pages i assume they are in a same project. If that is the case , maybe dynamically loading assemblies is really what you want. 

   http://www.silverlightshow.net/items/Silverlight-Dynamically-Loading-an-Assembly.aspx

   http://msdn.microsoft.com/en-us/library/cc903931(VS.95).aspx

Best Regards

Min-Hong Tang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities