This project is read-only.

Passing initParams

Apr 16, 2009 at 9:19 AM

Is there a possibility to pass initParams from the preloader xap to the final xap?
In the current version the initParams are translated to a package list which will be downloaded.
I did set the package list manually, but I want to add initParams to the xap.

Apr 23, 2009 at 10:32 AM
Edited Apr 23, 2009 at 10:37 AM

Hi Arjan,

Yes, there are 2 ways you can pass initParams to the loaded/final XAP:

1. Add a value in the loader initParams as an extra parameter separated by comma.



2. Set a new initParams value inside the loader after download is complete.
/ called on download complete of each package/file
public void downloadCompleteCallback(Uri packageSource, DownloadCompleteEventArgs e)  


In both of the above examples you will have a new value called "testValue" in initParams that you can use in the target xap ->

private void Application_Startup(object sender, StartupEventArgs e)
  x = e.InitParams["testValue"] ;